From 1205468c2351719f7a5c8bab0305354f8a90ac6e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 14 Nov 2022 12:39:35 -0500 Subject: [PATCH] Avoid double-delete when a Darwin subscribeAttribute subscription errors out. (#23557) * Avoid double-delete when a Darwin subscribeAttribute subscription errors out. Right now Darwin subscribeAttribute subscriptions do not support turning off auto-resubscribe, so never error out. But if we were to add that, we would end up with double delete: once when the error happens, and once from OnDone. This fix: 1) Ensures that we don't flag callback bridges as mKeepAlive until we have successfully sent a subscribe request. 2) Stops deleting on error if mKeepAlive is true. 3) Ensures the delete of the bridge from OnDone does not happen until after we have finished using the bridge object (e.g. to handle already-queued data or error notifications). We do this by queueing the delete to the same dispatch queue as the data/error notifications. * Address review comment. --- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 5 +- .../CHIP/MTRCallbackBridgeBase_internal.h | 37 +- .../CHIP/templates/MTRBaseClusters-src.zapt | 10 +- .../templates/partials/MTRCallbackBridge.zapt | 13 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 14210 +++++++++++----- .../MTRCallbackBridge_internal.h | 7841 ++++----- 6 files changed, 14415 insertions(+), 7701 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index fdc5cdbb6b2753..d4b9f1187f1915 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -688,9 +688,8 @@ CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const // Callback bridge for MTRDataValueDictionaryCallback class MTRDataValueDictionaryCallbackBridge : public MTRCallbackBridge { public: - MTRDataValueDictionaryCallbackBridge( - dispatch_queue_t queue, MTRDeviceResponseHandler handler, MTRActionBlock action, bool keepAlive = false) - : MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive) {}; + MTRDataValueDictionaryCallbackBridge(dispatch_queue_t queue, MTRDeviceResponseHandler handler, MTRActionBlock action) + : MTRCallbackBridge(queue, handler, action, OnSuccessFn) {}; static void OnSuccessFn(void * context, id value) { DispatchSuccess(context, value); } }; diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h index 56442b07480daa..5e4913a7a05880 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase_internal.h @@ -72,10 +72,9 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { * Construct a callback bridge, which can then have DispatcLocalAction() called * on it. */ - MTRCallbackBridge(dispatch_queue_t queue, MTRResponseHandler handler, T OnSuccessFn, bool keepAlive) + MTRCallbackBridge(dispatch_queue_t queue, MTRResponseHandler handler, T OnSuccessFn) : mQueue(queue) , mHandler(handler) - , mKeepAlive(keepAlive) , mSuccess(OnSuccessFn) , mFailure(OnFailureFn) { @@ -85,11 +84,10 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { * Construct a callback bridge, which can then have DispatchAction() called * on it. */ - MTRCallbackBridge(dispatch_queue_t queue, MTRResponseHandler handler, MTRActionBlock action, T OnSuccessFn, bool keepAlive) + MTRCallbackBridge(dispatch_queue_t queue, MTRResponseHandler handler, MTRActionBlock action, T OnSuccessFn) : mQueue(queue) , mHandler(handler) , mAction(action) - , mKeepAlive(keepAlive) , mSuccess(OnSuccessFn) , mFailure(OnFailureFn) { @@ -219,6 +217,26 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { static void DispatchFailure(void * context, NSError * error) { DispatchCallbackResult(context, error, nil); } protected: + // OnDone and KeepAliveOnCallback really only make sense for subscription + // bridges, but we put them here to avoid many copies of this code in + // generated bits. + void OnDone() + { + if (!mQueue) { + delete this; + return; + } + + // Delete ourselves async, so that any error/data reports we + // queued up before getting OnDone have a chance to run. + auto * self = this; + dispatch_async(mQueue, ^{ + delete self; + }); + } + + void KeepAliveOnCallback() { mKeepAlive = true; } + dispatch_queue_t mQueue; private: @@ -230,15 +248,12 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { } if (!callbackBridge->mQueue) { - delete callbackBridge; + if (!callbackBridge->mKeepAlive) { + delete callbackBridge; + } return; } - if (error) { - // We should delete ourselves; there will be no more callbacks. - callbackBridge->mKeepAlive = false; - } - dispatch_async(callbackBridge->mQueue, ^{ ChipLogDetail(Controller, "%s %f seconds", callbackBridge->mCookie.UTF8String, -[callbackBridge->mRequestTime timeIntervalSinceNow]); @@ -252,7 +267,7 @@ template class MTRCallbackBridge : public MTRCallbackBridgeBase { MTRResponseHandler mHandler; MTRActionBlock mAction; - bool mKeepAlive; + bool mKeepAlive = false; T mSuccess; MTRErrorCallback mFailure; diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt index bde911c9d391f1..768ae191d21e9e 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt @@ -195,12 +195,18 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value using TypeInfo = {{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; chip::Controller::{{asUpperCamelCase parent.name}}Cluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTR{{>attribute_data_callback_name}}CallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; } + [typedBridge](void) { typedBridge->OnDone(); } ); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); } diff --git a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt index 1f6b97e9a2b24e..433a069db99d5b 100644 --- a/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/MTRCallbackBridge.zapt @@ -13,12 +13,12 @@ class MTR{{> @partial-block}}Bridge : public MTRCallbackBridge<{{>callbackType}}> { public: - MTR{{> @partial-block}}Bridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) - : MTRCallbackBridge<{{>callbackType}}>(queue, handler, OnSuccessFn, keepAlive) + MTR{{> @partial-block}}Bridge(dispatch_queue_t queue, ResponseHandler handler) + : MTRCallbackBridge<{{>callbackType}}>(queue, handler, OnSuccessFn) {}; - MTR{{> @partial-block}}Bridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, bool keepAlive = false) - : MTRCallbackBridge<{{>callbackType}}>(queue, handler, action, OnSuccessFn, keepAlive) + MTR{{> @partial-block}}Bridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) + : MTRCallbackBridge<{{>callbackType}}>(queue, handler, action, OnSuccessFn) {}; static void OnSuccessFn(void * context @@ -43,11 +43,13 @@ class MTR{{> @partial-block}}SubscriptionBridge : public MTR{{> @partial-block}} { public: MTR{{> @partial-block}}SubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) - : MTR{{> @partial-block}}Bridge(queue, handler, action, true), + : MTR{{> @partial-block}}Bridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTR{{> @partial-block}}Bridge::OnDone; + using MTR{{> @partial-block}}Bridge::KeepAliveOnCallback; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -110,5 +112,6 @@ void MTR{{> @partial-block}}SubscriptionBridge::OnSubscriptionEstablished(void * self->mEstablishedHandler = nil; } } + {{/unless}} {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 3ebc20195b0e81..ba602ab44f2664 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -177,10 +177,16 @@ - (void)subscribeAttributeIdentifyTimeWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -240,10 +246,16 @@ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -306,11 +318,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -375,11 +393,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -441,11 +465,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -505,10 +535,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -568,10 +604,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; chip::Controller::IdentifyCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -1101,10 +1143,16 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -1165,11 +1213,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -1232,11 +1286,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -1297,11 +1357,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -1361,10 +1427,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -1424,10 +1496,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; chip::Controller::GroupsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2185,10 +2263,16 @@ - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2248,10 +2332,16 @@ - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2311,10 +2401,16 @@ - (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2374,10 +2470,16 @@ - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2437,10 +2539,16 @@ - (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2500,10 +2608,16 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2564,11 +2678,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2631,11 +2751,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2696,11 +2822,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2760,10 +2892,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -2823,10 +2961,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; chip::Controller::ScenesCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -3528,10 +3672,16 @@ - (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -3592,10 +3742,16 @@ - (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _No using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -3693,10 +3849,16 @@ - (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -3793,10 +3955,16 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -3900,11 +4068,17 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -3966,11 +4140,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4032,11 +4212,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4097,10 +4283,16 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4160,10 +4352,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4223,10 +4421,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; chip::Controller::OnOffCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4722,10 +4926,16 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4822,10 +5032,16 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4889,11 +5105,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -4959,11 +5181,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5028,11 +5256,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5093,10 +5327,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5156,10 +5396,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; chip::Controller::OnOffSwitchConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5794,10 +6040,16 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5857,10 +6109,16 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5920,10 +6178,16 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -5983,10 +6247,16 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6046,10 +6316,16 @@ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6109,10 +6385,16 @@ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6172,10 +6454,16 @@ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6272,10 +6560,16 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = LevelControl::Attributes::Options::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6373,10 +6667,16 @@ - (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _N using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6479,10 +6779,16 @@ - (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6584,10 +6890,16 @@ - (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6689,10 +7001,16 @@ - (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Non using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6794,10 +7112,16 @@ - (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6900,10 +7224,16 @@ - (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _N using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -6967,11 +7297,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -7036,11 +7372,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -7102,11 +7444,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -7166,10 +7514,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -7229,10 +7583,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; chip::Controller::LevelControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8125,10 +8485,16 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8225,10 +8591,16 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8325,10 +8697,16 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8425,10 +8803,16 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8488,10 +8872,16 @@ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8588,10 +8978,16 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8688,10 +9084,16 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8751,10 +9153,16 @@ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8814,10 +9222,16 @@ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8881,11 +9295,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -8951,11 +9371,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9019,11 +9445,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9084,10 +9516,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9147,10 +9585,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; chip::Controller::BinaryInputBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9775,11 +10219,17 @@ - (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9839,11 +10289,17 @@ - (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9903,11 +10359,17 @@ - (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -9967,11 +10429,17 @@ - (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10034,11 +10502,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10103,11 +10577,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10169,11 +10649,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10233,10 +10719,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10296,10 +10788,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; chip::Controller::DescriptorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10767,10 +11265,16 @@ - (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = Binding::Attributes::Binding::TypeInfo; chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10833,11 +11337,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10900,11 +11410,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -10966,11 +11482,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11030,10 +11552,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11093,10 +11621,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; chip::Controller::BindingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11536,10 +12070,16 @@ - (void)subscribeAttributeAclWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11660,11 +12200,17 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11727,10 +12273,16 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11794,10 +12346,16 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11861,10 +12419,16 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11928,11 +12492,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -11997,11 +12567,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -12063,11 +12639,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -12128,10 +12710,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -12191,10 +12779,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; chip::Controller::AccessControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13027,10 +13621,16 @@ - (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Actions::Attributes::ActionList::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13090,11 +13690,17 @@ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13154,10 +13760,16 @@ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13220,11 +13832,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13287,11 +13905,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13353,11 +13977,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13417,10 +14047,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13480,10 +14116,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; chip::Controller::ActionsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13932,10 +14574,16 @@ - (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Non using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -13995,10 +14643,16 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Basic::Attributes::VendorName::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14058,10 +14712,16 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = Basic::Attributes::VendorID::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14121,10 +14781,16 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = Basic::Attributes::ProductName::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14184,10 +14850,16 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = Basic::Attributes::ProductID::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14284,10 +14956,16 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14384,10 +15062,16 @@ - (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = Basic::Attributes::Location::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14447,10 +15131,16 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14511,10 +15201,16 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14575,10 +15271,16 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14639,10 +15341,16 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14703,10 +15411,16 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14766,10 +15480,16 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14829,10 +15549,16 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14892,10 +15618,16 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -14955,10 +15687,16 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15056,10 +15794,16 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15120,10 +15864,16 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = Basic::Attributes::Reachable::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15183,10 +15933,16 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15248,11 +16004,17 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15314,11 +16076,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15380,11 +16148,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15445,10 +16219,16 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15508,10 +16288,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -15571,10 +16357,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; chip::Controller::BasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -16687,11 +17479,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -16757,11 +17555,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -16826,11 +17630,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -16891,10 +17701,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -16954,10 +17770,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; chip::Controller::OtaSoftwareUpdateProviderCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17337,11 +18159,17 @@ - (void)subscribeAttributeDefaultOtaProvidersWithParams:(MTRSubscribeParams * _N using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17403,10 +18231,16 @@ - (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17470,12 +18304,18 @@ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17537,10 +18377,16 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17605,11 +18451,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17675,11 +18527,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17744,11 +18602,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17809,10 +18673,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -17872,10 +18742,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; chip::Controller::OtaSoftwareUpdateRequestorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18330,10 +19206,16 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18396,11 +19278,17 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18465,11 +19353,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18535,11 +19429,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18604,11 +19504,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18669,10 +19575,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -18732,10 +19644,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; chip::Controller::LocalizationConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19114,11 +20032,17 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19220,11 +20144,17 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19290,11 +20220,17 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19360,11 +20296,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19430,11 +20372,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19499,11 +20447,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19564,10 +20518,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -19627,10 +20587,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; chip::Controller::TimeFormatLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20055,11 +21021,17 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20124,11 +21096,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20194,11 +21172,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20262,11 +21246,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20327,10 +21317,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20390,10 +21386,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; chip::Controller::UnitLocalizationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20700,11 +21702,17 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20769,11 +21777,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20839,11 +21853,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20908,11 +21928,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -20973,10 +21999,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21036,10 +22068,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; chip::Controller::PowerSourceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21333,11 +22371,17 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = PowerSource::Attributes::Status::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21398,10 +22442,16 @@ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = PowerSource::Attributes::Order::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21461,10 +22511,16 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = PowerSource::Attributes::Description::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21526,10 +22582,16 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21592,10 +22654,16 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21658,11 +22726,17 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21724,10 +22798,16 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21789,10 +22869,16 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21854,10 +22940,16 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21918,10 +23010,16 @@ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -21983,11 +23081,17 @@ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Non using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22048,10 +23152,16 @@ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22112,10 +23222,16 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22176,10 +23292,16 @@ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22241,11 +23363,17 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22307,10 +23435,16 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22373,11 +23507,17 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22438,10 +23578,16 @@ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22501,11 +23647,17 @@ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22568,10 +23720,16 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22633,10 +23791,16 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22698,10 +23862,16 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22762,10 +23932,16 @@ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Non using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22826,10 +24002,16 @@ - (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _ using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22890,10 +24072,16 @@ - (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -22953,10 +24141,16 @@ - (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23018,11 +24212,17 @@ - (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23084,10 +24284,16 @@ - (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _N using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23150,10 +24356,16 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23215,10 +24427,16 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23282,11 +24500,17 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23351,11 +24575,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23420,11 +24650,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23486,11 +24722,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23550,10 +24792,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -23613,10 +24861,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; chip::Controller::PowerSourceCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25083,10 +26337,16 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25152,11 +26412,17 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25223,11 +26489,17 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25292,11 +26564,17 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25361,10 +26639,16 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25429,11 +26713,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25499,11 +26789,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25567,11 +26863,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25632,10 +26934,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -25695,10 +27003,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; chip::Controller::GeneralCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26365,10 +27679,16 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26430,11 +27750,17 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26496,10 +27822,16 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26561,10 +27893,16 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26662,10 +28000,16 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26730,12 +28074,18 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26797,10 +28147,16 @@ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26861,10 +28217,16 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26929,11 +28291,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -26999,11 +28367,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -27067,11 +28441,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -27132,10 +28512,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -27195,10 +28581,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; chip::Controller::NetworkCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -27817,11 +29209,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -27886,11 +29284,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -27954,11 +29358,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28019,10 +29429,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28082,10 +29498,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; chip::Controller::DiagnosticLogsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28384,11 +29806,17 @@ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Non using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28449,10 +29877,16 @@ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28512,10 +29946,16 @@ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28576,10 +30016,16 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28640,10 +30086,16 @@ - (void)subscribeAttributeBootReasonsWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28707,11 +30159,17 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28776,11 +30234,17 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28845,11 +30309,17 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28913,10 +30383,16 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -28981,11 +30457,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29051,11 +30533,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29119,11 +30607,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29184,10 +30678,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29247,10 +30747,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; chip::Controller::GeneralDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29860,11 +31366,17 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29925,10 +31437,16 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -29988,10 +31506,16 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30053,10 +31577,16 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30121,11 +31651,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30191,11 +31727,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30259,11 +31801,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30324,10 +31872,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30387,10 +31941,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; chip::Controller::SoftwareDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30831,10 +32391,16 @@ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30897,11 +32463,17 @@ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -30962,10 +32534,16 @@ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31025,10 +32603,16 @@ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31088,10 +32672,16 @@ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31151,10 +32741,16 @@ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31214,10 +32810,16 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31280,11 +32882,17 @@ - (void)subscribeAttributeNeighborTableListWithParams:(MTRSubscribeParams * _Non using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31348,11 +32956,17 @@ - (void)subscribeAttributeRouteTableListWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31413,10 +33027,16 @@ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31476,10 +33096,16 @@ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31539,10 +33165,16 @@ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31602,10 +33234,16 @@ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Non using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31665,10 +33303,16 @@ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31728,10 +33372,16 @@ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Non using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31791,10 +33441,16 @@ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31854,10 +33510,16 @@ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31917,10 +33579,16 @@ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -31981,10 +33649,16 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32047,10 +33721,16 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32114,10 +33794,16 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32178,10 +33864,16 @@ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Non using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32241,10 +33933,16 @@ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32304,10 +34002,16 @@ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32367,10 +34071,16 @@ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32431,10 +34141,16 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32495,10 +34211,16 @@ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32559,10 +34281,16 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32623,10 +34351,16 @@ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32686,10 +34420,16 @@ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32749,10 +34489,16 @@ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32813,10 +34559,16 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32877,10 +34629,16 @@ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -32940,10 +34698,16 @@ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33005,10 +34769,16 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33072,10 +34842,16 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33136,10 +34912,16 @@ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33199,10 +34981,16 @@ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33263,10 +35051,16 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33327,10 +35121,16 @@ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33390,10 +35190,16 @@ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33453,10 +35259,16 @@ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33516,10 +35328,16 @@ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33579,10 +35397,16 @@ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33642,10 +35466,16 @@ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33706,10 +35536,16 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33770,10 +35606,16 @@ - (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33835,10 +35677,16 @@ - (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33901,10 +35749,16 @@ - (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -33965,10 +35819,16 @@ - (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Non using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34028,10 +35888,16 @@ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Non using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34093,10 +35959,16 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34159,10 +36031,16 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34223,10 +36101,16 @@ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34286,10 +36170,16 @@ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34349,10 +36239,16 @@ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34412,10 +36308,16 @@ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34475,10 +36377,16 @@ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34538,10 +36446,16 @@ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34606,11 +36520,17 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34672,10 +36592,16 @@ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34746,12 +36672,18 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion: using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34822,12 +36754,18 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34893,11 +36831,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -34963,11 +36907,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -35032,11 +36982,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -35097,10 +37053,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -35160,10 +37122,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; chip::Controller::ThreadNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -37668,10 +39636,16 @@ - (void)subscribeAttributeBssidWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -37734,11 +39708,17 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -37803,12 +39783,18 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -37869,10 +39855,16 @@ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -37932,10 +39924,16 @@ - (void)subscribeAttributeRssiWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -37995,10 +39993,16 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38058,10 +40062,16 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38123,10 +40133,16 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38189,10 +40205,16 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38254,10 +40276,16 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38319,10 +40347,16 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38383,10 +40417,16 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38446,10 +40486,16 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38513,11 +40559,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38583,11 +40635,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38652,11 +40710,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38717,10 +40781,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -38780,10 +40850,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; chip::Controller::WiFiNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39532,12 +41608,18 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39598,10 +41680,16 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39661,10 +41749,16 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39724,10 +41818,16 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39787,10 +41887,16 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39850,10 +41956,16 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39913,10 +42025,16 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -39976,10 +42094,16 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40039,10 +42163,16 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40106,11 +42236,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40176,11 +42312,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40245,11 +42387,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40310,10 +42458,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40373,10 +42527,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; chip::Controller::EthernetNetworkDiagnosticsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -40953,10 +43113,16 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41016,10 +43182,16 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41079,10 +43251,16 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41179,10 +43357,16 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41242,10 +43426,16 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41306,10 +43496,16 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41370,10 +43566,16 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41434,10 +43636,16 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41498,10 +43706,16 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41561,10 +43775,16 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41624,10 +43844,16 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41687,10 +43913,16 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41750,10 +43982,16 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41813,10 +44051,16 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41876,10 +44120,16 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -41943,11 +44193,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -42013,11 +44269,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -42081,11 +44343,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -42146,10 +44414,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -42209,10 +44483,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; chip::Controller::BridgedDeviceBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -42993,10 +45273,16 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43056,10 +45342,16 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43119,10 +45411,16 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43183,11 +45481,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43250,11 +45554,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43315,11 +45625,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43379,10 +45695,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43442,10 +45764,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; chip::Controller::SwitchCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43916,12 +46244,18 @@ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -43982,10 +46316,16 @@ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44045,10 +46385,16 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44112,11 +46458,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44182,11 +46534,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44251,11 +46609,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44316,10 +46680,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44379,10 +46749,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; chip::Controller::AdministratorCommissioningCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -44994,11 +47370,17 @@ - (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45063,11 +47445,17 @@ - (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45128,10 +47516,16 @@ - (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45192,10 +47586,16 @@ - (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _N using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45261,11 +47661,17 @@ - (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45328,10 +47734,16 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45396,11 +47808,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45466,11 +47884,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45535,11 +47959,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45600,10 +48030,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -45663,10 +48099,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46410,11 +48852,17 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46479,11 +48927,17 @@ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46545,10 +48999,16 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46610,10 +49070,16 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46678,11 +49144,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46748,11 +49220,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46816,11 +49294,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46881,10 +49365,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -46944,10 +49434,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -47378,11 +49874,17 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -47445,11 +49947,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -47514,11 +50022,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -47580,11 +50094,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -47644,10 +50164,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -47707,10 +50233,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; chip::Controller::FixedLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48062,10 +50594,16 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48128,11 +50666,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48197,11 +50741,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48263,11 +50813,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48327,10 +50883,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48390,10 +50952,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48696,10 +51264,16 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48762,11 +51336,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48831,11 +51411,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48897,11 +51483,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -48961,10 +51553,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49024,10 +51622,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; chip::Controller::BooleanStateCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49347,10 +51951,16 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49410,10 +52020,16 @@ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Non using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49473,11 +52089,17 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49537,10 +52159,16 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49642,10 +52270,16 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49747,10 +52381,16 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49813,11 +52453,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49882,11 +52528,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -49948,11 +52600,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -50012,10 +52670,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -50075,10 +52739,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; chip::Controller::ModeSelectCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51168,11 +53838,17 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51233,11 +53909,17 @@ - (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51297,10 +53979,16 @@ - (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51362,11 +54050,17 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51464,10 +54158,16 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51564,10 +54264,16 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51664,10 +54370,16 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51729,10 +54441,16 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51795,10 +54513,16 @@ - (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParam using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51861,10 +54585,16 @@ - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribePara using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51928,10 +54658,16 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -51996,10 +54732,16 @@ - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MT using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52064,10 +54806,16 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52128,10 +54876,16 @@ - (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52191,10 +54945,16 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52254,10 +55014,16 @@ - (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52317,10 +55083,16 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52382,11 +55154,17 @@ - (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52451,10 +55229,16 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52552,10 +55336,16 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = DoorLock::Attributes::Language::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52652,10 +55442,16 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52752,10 +55548,16 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52852,10 +55654,16 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -52952,11 +55760,17 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53021,11 +55835,17 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53092,11 +55912,17 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53197,10 +56023,16 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53299,10 +56131,16 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53401,10 +56239,16 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53504,10 +56348,16 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53609,11 +56459,17 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53713,10 +56569,16 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53817,10 +56679,16 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -53918,10 +56786,16 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54021,10 +56895,16 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54123,10 +57003,16 @@ - (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _N using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54190,11 +57076,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54259,11 +57151,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54325,11 +57223,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54389,10 +57293,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -54452,10 +57362,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; chip::Controller::DoorLockCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56472,11 +59388,17 @@ - (void)subscribeAttributeTypeWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56538,10 +59460,16 @@ - (void)subscribeAttributePhysicalClosedLimitLiftWithParams:(MTRSubscribeParams using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56604,10 +59532,16 @@ - (void)subscribeAttributePhysicalClosedLimitTiltWithParams:(MTRSubscribeParams using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56669,10 +59603,16 @@ - (void)subscribeAttributeCurrentPositionLiftWithParams:(MTRSubscribeParams * _N using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56734,10 +59674,16 @@ - (void)subscribeAttributeCurrentPositionTiltWithParams:(MTRSubscribeParams * _N using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56800,10 +59746,16 @@ - (void)subscribeAttributeNumberOfActuationsLiftWithParams:(MTRSubscribeParams * using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56866,10 +59818,16 @@ - (void)subscribeAttributeNumberOfActuationsTiltWithParams:(MTRSubscribeParams * using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56930,11 +59888,17 @@ - (void)subscribeAttributeConfigStatusWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -56997,10 +59961,16 @@ - (void)subscribeAttributeCurrentPositionLiftPercentageWithParams:(MTRSubscribeP using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57064,10 +60034,16 @@ - (void)subscribeAttributeCurrentPositionTiltPercentageWithParams:(MTRSubscribeP using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57130,11 +60106,17 @@ - (void)subscribeAttributeOperationalStatusWithParams:(MTRSubscribeParams * _Non using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57198,10 +60180,16 @@ - (void)subscribeAttributeTargetPositionLiftPercent100thsWithParams:(MTRSubscrib using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57265,10 +60253,16 @@ - (void)subscribeAttributeTargetPositionTiltPercent100thsWithParams:(MTRSubscrib using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57331,11 +60325,17 @@ - (void)subscribeAttributeEndProductTypeWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57399,10 +60399,16 @@ - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithParams:(MTRSubscri using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57466,10 +60472,16 @@ - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithParams:(MTRSubscri using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57532,10 +60544,16 @@ - (void)subscribeAttributeInstalledOpenLimitLiftWithParams:(MTRSubscribeParams * using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57598,10 +60616,16 @@ - (void)subscribeAttributeInstalledClosedLimitLiftWithParams:(MTRSubscribeParams using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57664,10 +60688,16 @@ - (void)subscribeAttributeInstalledOpenLimitTiltWithParams:(MTRSubscribeParams * using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57730,10 +60760,16 @@ - (void)subscribeAttributeInstalledClosedLimitTiltWithParams:(MTRSubscribeParams using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57831,10 +60867,16 @@ - (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57894,11 +60936,17 @@ - (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -57962,11 +61010,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -58031,11 +61085,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -58099,11 +61159,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -58164,10 +61230,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -58227,10 +61299,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; chip::Controller::WindowCoveringCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59381,10 +62459,16 @@ - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _No using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59446,10 +62530,16 @@ - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _N using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59511,10 +62601,16 @@ - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _N using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59612,10 +62708,16 @@ - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Non using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59713,10 +62815,16 @@ - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _No using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59816,10 +62924,16 @@ - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -59919,10 +63033,16 @@ - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParam using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60020,10 +63140,16 @@ - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Non using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60121,10 +63247,16 @@ - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _No using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60185,10 +63317,16 @@ - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60252,11 +63390,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60321,11 +63465,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60389,11 +63539,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60454,10 +63610,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -60517,10 +63679,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; chip::Controller::BarrierControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61218,10 +64386,16 @@ - (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61281,10 +64455,16 @@ - (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61344,10 +64524,16 @@ - (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61407,10 +64593,16 @@ - (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61470,10 +64662,16 @@ - (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61533,10 +64731,16 @@ - (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61596,10 +64800,16 @@ - (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61659,10 +64869,16 @@ - (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61722,10 +64938,16 @@ - (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61785,10 +65007,16 @@ - (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61848,10 +65076,16 @@ - (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61911,10 +65145,16 @@ - (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -61974,10 +65214,16 @@ - (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62039,11 +65285,17 @@ - (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62110,12 +65362,18 @@ - (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62181,11 +65439,17 @@ - (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _ using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62247,10 +65511,16 @@ - (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62310,10 +65580,16 @@ - (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62416,10 +65692,16 @@ - (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _ using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62480,10 +65762,16 @@ - (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62587,10 +65875,16 @@ - (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62692,12 +65986,18 @@ - (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62798,11 +66098,17 @@ - (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62868,12 +66174,18 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -62939,11 +66251,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -63008,11 +66326,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -63073,10 +66397,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -63136,10 +66466,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; chip::Controller::PumpConfigurationAndControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64377,10 +67713,16 @@ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64441,10 +67783,16 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64505,10 +67853,16 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64570,10 +67924,16 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64636,10 +67996,16 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64702,10 +68068,16 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64768,10 +68140,16 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64832,10 +68210,16 @@ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64895,10 +68279,16 @@ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -64997,10 +68387,16 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65100,10 +68496,16 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65203,10 +68605,16 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65306,10 +68714,16 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65409,10 +68823,16 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65512,10 +68932,16 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65614,10 +69040,16 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65716,10 +69148,16 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65818,10 +69256,16 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -65920,10 +69364,16 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66022,10 +69472,16 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66123,10 +69579,16 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66228,11 +69690,17 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66331,10 +69799,16 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66395,10 +69869,16 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66459,10 +69939,16 @@ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66524,10 +70010,16 @@ - (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParam using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66590,10 +70082,16 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66693,10 +70191,16 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66803,10 +70307,16 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66908,10 +70418,16 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -66974,10 +70490,16 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67039,10 +70561,16 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67104,10 +70632,16 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67171,10 +70705,16 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67277,10 +70817,16 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67341,10 +70887,16 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67406,10 +70958,16 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67512,10 +71070,16 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67576,10 +71140,16 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67641,10 +71211,16 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67743,10 +71319,16 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67844,10 +71426,16 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -67944,10 +71532,16 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68044,10 +71638,16 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68144,10 +71744,16 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68244,10 +71850,16 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68344,10 +71956,16 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68407,10 +72025,16 @@ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Non using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68507,10 +72131,16 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68573,11 +72203,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68642,11 +72278,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68708,11 +72350,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68772,10 +72420,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -68835,10 +72489,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; chip::Controller::ThermostatCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71184,11 +74844,17 @@ - (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71287,11 +74953,17 @@ - (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71394,10 +75066,16 @@ - (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71457,10 +75135,16 @@ - (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71520,10 +75204,16 @@ - (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71625,10 +75315,16 @@ - (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71688,10 +75384,16 @@ - (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71751,10 +75453,16 @@ - (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71851,10 +75559,16 @@ - (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -71914,10 +75628,16 @@ - (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -72014,10 +75734,16 @@ - (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -72080,11 +75806,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -72149,11 +75881,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -72215,11 +75953,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -72279,10 +76023,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -72342,10 +76092,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; chip::Controller::FanControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73078,10 +76834,16 @@ - (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73179,10 +76941,16 @@ - (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73282,10 +77050,16 @@ - (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeP using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73352,12 +77126,18 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73425,12 +77205,18 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73497,12 +77283,18 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73563,10 +77355,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -73626,10 +77424,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; chip::Controller::ThermostatUserInterfaceConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -74623,10 +78427,16 @@ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -74686,10 +78496,16 @@ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -74749,10 +78565,16 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -74812,10 +78634,16 @@ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -74875,10 +78703,16 @@ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -74938,10 +78772,16 @@ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75001,10 +78841,16 @@ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75066,10 +78912,16 @@ - (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75130,10 +78982,16 @@ - (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75230,10 +79088,16 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = ColorControl::Attributes::Options::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75293,10 +79157,16 @@ - (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75356,10 +79226,16 @@ - (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75419,10 +79295,16 @@ - (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75482,10 +79364,16 @@ - (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75545,10 +79433,16 @@ - (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75608,10 +79502,16 @@ - (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75671,10 +79571,16 @@ - (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75734,10 +79640,16 @@ - (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75797,10 +79709,16 @@ - (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75860,10 +79778,16 @@ - (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75923,10 +79847,16 @@ - (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -75986,10 +79916,16 @@ - (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76049,10 +79985,16 @@ - (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76112,10 +80054,16 @@ - (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76175,10 +80123,16 @@ - (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76238,10 +80192,16 @@ - (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76301,10 +80261,16 @@ - (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76364,10 +80330,16 @@ - (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76427,10 +80399,16 @@ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76527,10 +80505,16 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76627,10 +80611,16 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76727,10 +80717,16 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76827,10 +80823,16 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -76933,10 +80935,16 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77034,10 +81042,16 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77134,10 +81148,16 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77240,10 +81260,16 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77341,10 +81367,16 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77441,10 +81473,16 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77547,10 +81585,16 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77612,10 +81656,16 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77676,10 +81726,16 @@ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77739,10 +81795,16 @@ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77803,10 +81865,16 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77867,10 +81935,16 @@ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77932,10 +82006,16 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -77998,10 +82078,16 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78062,10 +82148,16 @@ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Non using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78127,10 +82219,16 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78193,10 +82291,16 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78260,10 +82364,16 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78369,10 +82479,16 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78436,11 +82552,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78505,11 +82627,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78571,11 +82699,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78635,10 +82769,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -78698,10 +82838,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; chip::Controller::ColorControlCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -80986,10 +85132,16 @@ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81049,10 +85201,16 @@ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81112,10 +85270,16 @@ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81212,10 +85376,16 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81312,10 +85482,16 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81419,10 +85595,16 @@ - (void)subscribeAttributeIntrinsicBalanceFactorWithParams:(MTRSubscribeParams * using TypeInfo = BallastConfiguration::Attributes::IntrinsicBalanceFactor::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81527,10 +85709,16 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81591,10 +85779,16 @@ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81691,10 +85885,16 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81791,10 +85991,16 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -81896,10 +86102,16 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82001,10 +86213,16 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82101,10 +86319,16 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82208,10 +86432,16 @@ - (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82276,11 +86506,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82346,11 +86582,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82414,11 +86656,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82479,10 +86727,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -82542,10 +86796,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; chip::Controller::BallastConfigurationCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83394,10 +87654,16 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83457,10 +87723,16 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83520,10 +87792,16 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83583,10 +87861,16 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83646,10 +87930,16 @@ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83713,11 +88003,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83783,11 +88079,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83852,11 +88154,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83917,10 +88225,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -83980,10 +88294,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; chip::Controller::IlluminanceMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84416,10 +88736,16 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84479,10 +88805,16 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84542,10 +88874,16 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84605,10 +88943,16 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84672,11 +89016,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84742,11 +89092,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84811,11 +89167,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84876,10 +89238,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -84939,10 +89307,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; chip::Controller::TemperatureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85340,10 +89714,16 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85403,10 +89783,16 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85466,10 +89852,16 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85529,10 +89921,16 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85592,10 +89990,16 @@ - (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85655,10 +90059,16 @@ - (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85718,10 +90128,16 @@ - (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85781,10 +90197,16 @@ - (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85844,10 +90266,16 @@ - (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85911,11 +90339,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -85981,11 +90415,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86049,11 +90489,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86114,10 +90560,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86177,10 +90629,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; chip::Controller::PressureMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86746,10 +91204,16 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86809,10 +91273,16 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86872,10 +91342,16 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -86935,10 +91411,16 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87002,11 +91484,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87072,11 +91560,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87140,11 +91634,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87205,10 +91705,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87268,10 +91774,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; chip::Controller::FlowMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87669,10 +92181,16 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87732,10 +92250,16 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87795,10 +92319,16 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87858,10 +92388,16 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87926,12 +92462,18 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -87997,11 +92539,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88066,11 +92614,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88131,10 +92685,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88194,10 +92754,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; chip::Controller::RelativeHumidityMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88595,10 +93161,16 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88659,10 +93231,16 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88725,10 +93303,16 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88829,10 +93413,16 @@ - (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithParams:(MTRSubscribePa using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -88933,10 +93523,16 @@ - (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithParams:(MTRSubscribePa using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89038,10 +93634,16 @@ - (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithParams:(MTRSubscri using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89143,10 +93745,16 @@ - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubs using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89248,10 +93856,16 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubs using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89355,10 +93969,16 @@ - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTR using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89462,10 +94082,16 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89570,10 +94196,16 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89678,10 +94310,16 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89747,11 +94385,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89817,11 +94461,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89885,11 +94535,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -89950,10 +94606,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -90013,10 +94675,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; chip::Controller::OccupancySensingCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -90807,10 +95475,16 @@ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -90873,11 +95547,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -90942,11 +95622,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91008,11 +95694,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91072,10 +95764,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91135,10 +95833,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; chip::Controller::WakeOnLanCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91512,10 +96216,16 @@ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91577,10 +96287,16 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = Channel::Attributes::Lineup::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91643,11 +96359,17 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91711,11 +96433,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91778,11 +96506,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91844,11 +96578,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91908,10 +96648,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -91971,10 +96717,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; chip::Controller::ChannelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92380,11 +97132,17 @@ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92444,10 +97202,16 @@ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92511,11 +97275,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92581,11 +97351,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92649,11 +97425,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92714,10 +97496,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -92777,10 +97565,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; chip::Controller::TargetNavigatorCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93435,11 +98229,17 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93500,10 +98300,16 @@ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93563,10 +98369,16 @@ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93630,11 +98442,17 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93696,10 +98514,16 @@ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93759,10 +98583,16 @@ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93822,10 +98652,16 @@ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93888,11 +98724,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -93957,11 +98799,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -94023,11 +98871,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -94088,10 +98942,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -94151,10 +99011,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; chip::Controller::MediaPlaybackCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -94877,11 +99743,17 @@ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -94941,10 +99813,16 @@ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95007,11 +99885,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95076,11 +99960,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95142,11 +100032,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95206,10 +100102,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95269,10 +100171,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; chip::Controller::MediaInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95661,11 +100569,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95730,11 +100644,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95796,11 +100716,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95860,10 +100786,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -95923,10 +100855,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; chip::Controller::LowPowerCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -96223,11 +101161,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -96292,11 +101236,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -96358,11 +101308,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -96422,10 +101378,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -96485,10 +101447,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; chip::Controller::KeypadInputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -96963,11 +101931,17 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97067,10 +102041,16 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97135,11 +102115,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97205,11 +102191,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97273,11 +102265,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97338,10 +102336,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97401,10 +102405,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; chip::Controller::ContentLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97813,11 +102823,17 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97877,10 +102893,16 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -97943,11 +102965,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98012,11 +103040,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98078,11 +103112,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98142,10 +103182,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98205,10 +103251,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; chip::Controller::AudioOutputCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98634,11 +103686,17 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98753,11 +103811,17 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98823,11 +103887,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98893,11 +103963,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -98961,11 +104037,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99026,10 +104108,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99089,10 +104177,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; chip::Controller::ApplicationLauncherCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99450,10 +104544,16 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99513,10 +104613,16 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99576,10 +104682,16 @@ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99639,10 +104751,16 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99706,11 +104824,17 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99776,11 +104900,17 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99842,10 +104972,16 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99908,11 +105044,17 @@ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Non using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -99977,11 +105119,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -100047,11 +105195,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -100115,11 +105269,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -100180,10 +105340,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -100243,10 +105409,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; chip::Controller::ApplicationBasicCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -100873,11 +106045,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -100942,11 +106120,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101008,11 +106192,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101072,10 +106262,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101135,10 +106331,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; chip::Controller::AccountLoginCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101479,10 +106681,16 @@ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101542,10 +106750,16 @@ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101605,10 +106819,16 @@ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101668,10 +106888,16 @@ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101731,10 +106957,16 @@ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101794,10 +107026,16 @@ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101857,10 +107095,16 @@ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101920,10 +107164,16 @@ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -101983,10 +107233,16 @@ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102046,10 +107302,16 @@ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102110,10 +107372,16 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102174,10 +107442,16 @@ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102238,10 +107512,16 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102302,10 +107582,16 @@ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102365,10 +107651,16 @@ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102428,10 +107720,16 @@ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102491,10 +107789,16 @@ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102554,10 +107858,16 @@ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102617,10 +107927,16 @@ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102680,10 +107996,16 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102743,10 +108065,16 @@ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102807,10 +108135,16 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102872,10 +108206,16 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -102938,10 +108278,16 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103004,10 +108350,16 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103070,10 +108422,16 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103136,10 +108494,16 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103202,10 +108566,16 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103268,10 +108638,16 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103335,10 +108711,16 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103402,10 +108784,16 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103469,10 +108857,16 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103536,10 +108930,16 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103603,10 +109003,16 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103670,10 +109076,16 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103735,10 +109147,16 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103800,10 +109218,16 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103864,10 +109288,16 @@ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103927,10 +109357,16 @@ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull) using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -103992,10 +109428,16 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104059,10 +109501,16 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104124,10 +109572,16 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104190,10 +109644,16 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104256,10 +109716,16 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104323,10 +109789,16 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104388,10 +109860,16 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104452,10 +109930,16 @@ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104515,10 +109999,16 @@ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104578,10 +110068,16 @@ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104641,10 +110137,16 @@ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104704,10 +110206,16 @@ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104767,10 +110275,16 @@ - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104830,10 +110344,16 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104893,10 +110413,16 @@ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -104956,10 +110482,16 @@ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105019,10 +110551,16 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105082,10 +110620,16 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105145,10 +110689,16 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105249,10 +110799,16 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105353,10 +110909,16 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105456,10 +111018,16 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105560,10 +111128,16 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribePa using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105662,10 +111236,16 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105764,10 +111344,16 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105829,10 +111415,16 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105893,10 +111485,16 @@ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -105957,10 +111555,16 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106021,10 +111625,16 @@ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106084,10 +111694,16 @@ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106147,10 +111763,16 @@ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106248,10 +111870,16 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _No using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106312,10 +111940,16 @@ - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106375,10 +112009,16 @@ - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106476,10 +112116,16 @@ - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106540,10 +112186,16 @@ - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106603,10 +112255,16 @@ - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106667,10 +112325,16 @@ - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106733,10 +112397,16 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106798,10 +112468,16 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106864,10 +112540,16 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106929,10 +112611,16 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -106995,10 +112683,16 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107059,10 +112753,16 @@ - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107122,10 +112822,16 @@ - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107185,10 +112891,16 @@ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107249,10 +112961,16 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107314,10 +113032,16 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107378,10 +113102,16 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107442,10 +113172,16 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107507,10 +113243,16 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107571,10 +113313,16 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107635,10 +113383,16 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107700,10 +113454,16 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107764,10 +113524,16 @@ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107828,10 +113594,16 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107893,10 +113665,16 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -107958,10 +113736,16 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108023,10 +113807,16 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108087,10 +113877,16 @@ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108153,10 +113949,16 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108221,10 +114023,16 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108288,10 +114096,16 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubs using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108355,10 +114169,16 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscr using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108422,10 +114242,16 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubsc using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108488,10 +114314,16 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParam using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108554,10 +114386,16 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribePar using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108618,10 +114456,16 @@ - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108682,10 +114526,16 @@ - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108747,10 +114597,16 @@ - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108811,10 +114667,16 @@ - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108875,10 +114737,16 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -108940,10 +114808,16 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109004,10 +114878,16 @@ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109068,10 +114948,16 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109133,10 +115019,16 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109197,10 +115089,16 @@ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109261,10 +115159,16 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109326,10 +115230,16 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109391,10 +115301,16 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109456,10 +115372,16 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109520,10 +115442,16 @@ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Non using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109586,10 +115514,16 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109654,10 +115588,16 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109721,10 +115661,16 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109788,10 +115734,16 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscr using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109855,10 +115807,16 @@ - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubsc using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109921,10 +115879,16 @@ - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParam using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -109987,10 +115951,16 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribePar using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -110055,11 +116025,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -110125,11 +116101,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -110194,11 +116176,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -110259,10 +116247,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -110322,10 +116316,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; chip::Controller::ElectricalMeasurementCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -116597,10 +122597,16 @@ - (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -116697,10 +122703,16 @@ - (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -116797,10 +122809,16 @@ - (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -116897,10 +122915,16 @@ - (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -116997,10 +123021,16 @@ - (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117097,10 +123127,16 @@ - (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117197,10 +123233,16 @@ - (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117297,10 +123339,16 @@ - (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117397,10 +123445,16 @@ - (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117497,10 +123551,16 @@ - (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117597,10 +123657,16 @@ - (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117697,10 +123763,16 @@ - (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117797,10 +123869,16 @@ - (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117897,10 +123975,16 @@ - (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -117997,10 +124081,16 @@ - (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118097,10 +124187,16 @@ - (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118197,10 +124293,16 @@ - (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118297,10 +124399,16 @@ - (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118397,10 +124505,16 @@ - (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118497,10 +124611,16 @@ - (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118597,10 +124717,16 @@ - (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118697,10 +124823,16 @@ - (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118797,10 +124929,16 @@ - (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118897,10 +125035,16 @@ - (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -118997,10 +125141,16 @@ - (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119097,10 +125247,16 @@ - (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119218,11 +125374,17 @@ - (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams * _Nonnull)par using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119340,11 +125502,17 @@ - (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119467,11 +125635,17 @@ - (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams * using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119570,10 +125744,16 @@ - (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119670,10 +125850,16 @@ - (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119770,10 +125956,16 @@ - (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119870,10 +126062,16 @@ - (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams * _Nonnull)param using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -119970,10 +126168,16 @@ - (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams * _Nonnull)params using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120070,10 +126274,16 @@ - (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120369,11 +126579,17 @@ - (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscrib using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120472,11 +126688,17 @@ - (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams * _Nonnull)para using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120583,11 +126805,17 @@ - (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120686,10 +126914,16 @@ - (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams * _ using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120788,10 +127022,16 @@ - (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams * _ using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120890,10 +127130,16 @@ - (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams * using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -120992,10 +127238,16 @@ - (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams * using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121117,11 +127369,17 @@ - (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121301,11 +127559,17 @@ - (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121403,10 +127667,16 @@ - (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams * _Non using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121504,10 +127774,16 @@ - (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121606,10 +127882,16 @@ - (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121707,10 +127989,16 @@ - (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams * _Nonnull)p using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121812,10 +128100,16 @@ - (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -121917,11 +128211,17 @@ - (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122023,11 +128323,17 @@ - (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122129,11 +128435,17 @@ - (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122235,11 +128547,17 @@ - (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122341,10 +128659,16 @@ - (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122446,10 +128770,16 @@ - (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122551,10 +128881,16 @@ - (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122656,10 +128992,16 @@ - (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122761,10 +129103,16 @@ - (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122866,10 +129214,16 @@ - (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -122971,10 +129325,16 @@ - (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123076,10 +129436,16 @@ - (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123181,10 +129547,16 @@ - (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123286,10 +129658,16 @@ - (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123391,10 +129769,16 @@ - (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123496,10 +129880,16 @@ - (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123601,10 +129991,16 @@ - (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123706,10 +130102,16 @@ - (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123811,10 +130213,16 @@ - (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -123916,10 +130324,16 @@ - (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124021,10 +130435,16 @@ - (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124126,10 +130546,16 @@ - (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124232,10 +130658,16 @@ - (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124339,10 +130771,16 @@ - (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124445,10 +130883,16 @@ - (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124551,10 +130995,16 @@ - (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams * _No using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124659,11 +131109,17 @@ - (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams * _Nonn using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124780,11 +131236,17 @@ - (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -124891,10 +131353,16 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribePa using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125000,10 +131468,16 @@ - (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribePa using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125109,10 +131583,16 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeP using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125218,10 +131698,16 @@ - (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeP using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, - !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { delete typedBridge; }); + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125319,10 +131805,16 @@ - (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams * _Nonnul using TypeInfo = TestCluster::Attributes::WriteOnlyInt8u::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125385,11 +131877,17 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125454,11 +131952,17 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125520,11 +132024,17 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125584,10 +132094,16 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); @@ -125647,10 +132163,16 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; chip::Controller::TestClusterCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.SubscribeAttribute(bridge, successCb, failureCb, [params.minInterval unsignedShortValue], - [params.maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - nil, params.filterByFabric, !params.replaceExistingSubscriptions, chip::NullOptional, - [typedBridge](void) { delete typedBridge; }); + CHIP_ERROR err = cppCluster.SubscribeAttribute(bridge, successCb, failureCb, + [params.minInterval unsignedShortValue], [params.maxInterval unsignedShortValue], + MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params.filterByFabric, + !params.replaceExistingSubscriptions, chip::NullOptional, [typedBridge](void) { typedBridge->OnDone(); }); + if (err == CHIP_NO_ERROR) { + // Now that we kicked off the subscribe, flag our callback bridge + // to stay alive until we get an OnDone. + typedBridge->KeepAliveOnCallback(); + } + return err; }, subscriptionEstablished); std::move(*bridge).DispatchAction(self.device); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h index 5bd5d631189878..528d5d99ca7178 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge_internal.h @@ -1114,12 +1114,11 @@ typedef void (*TestClusterAttributeListListAttributeCallback)(void * context, class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge { public: - MTRDefaultSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDefaultSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDefaultSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDefaultSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context); }; @@ -1127,12 +1126,11 @@ class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge { public: - MTRCommandSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRCommandSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCommandSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRCommandSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::NullObjectType &); }; @@ -1140,12 +1138,11 @@ class MTRCommandSuccessCallbackBridge : public MTRCallbackBridge { public: - MTROctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTROctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::ByteSpan value); }; @@ -1155,11 +1152,13 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA public: MTROctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROctetStringAttributeCallbackBridge(queue, handler, action, true), + MTROctetStringAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROctetStringAttributeCallbackBridge::KeepAliveOnCallback; + using MTROctetStringAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1168,12 +1167,11 @@ class MTROctetStringAttributeCallbackSubscriptionBridge : public MTROctetStringA class MTRNullableOctetStringAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableOctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableOctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableOctetStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1184,11 +1182,13 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull MTRNullableOctetStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOctetStringAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOctetStringAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOctetStringAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOctetStringAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1197,12 +1197,11 @@ class MTRNullableOctetStringAttributeCallbackSubscriptionBridge : public MTRNull class MTRCharStringAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::CharSpan value); }; @@ -1212,11 +1211,13 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt public: MTRCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRCharStringAttributeCallbackBridge(queue, handler, action, true), + MTRCharStringAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRCharStringAttributeCallbackBridge::KeepAliveOnCallback; + using MTRCharStringAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1225,12 +1226,11 @@ class MTRCharStringAttributeCallbackSubscriptionBridge : public MTRCharStringAtt class MTRNullableCharStringAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableCharStringAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1240,11 +1240,13 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla public: MTRNullableCharStringAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableCharStringAttributeCallbackBridge(queue, handler, action, true), + MTRNullableCharStringAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableCharStringAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableCharStringAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1253,12 +1255,11 @@ class MTRNullableCharStringAttributeCallbackSubscriptionBridge : public MTRNulla class MTRBooleanAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, bool value); }; @@ -1268,11 +1269,13 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute public: MTRBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBooleanAttributeCallbackBridge(queue, handler, action, true), + MTRBooleanAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBooleanAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBooleanAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1281,12 +1284,11 @@ class MTRBooleanAttributeCallbackSubscriptionBridge : public MTRBooleanAttribute class MTRNullableBooleanAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableBooleanAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1296,11 +1298,13 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable public: MTRNullableBooleanAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableBooleanAttributeCallbackBridge(queue, handler, action, true), + MTRNullableBooleanAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableBooleanAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBooleanAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1309,12 +1313,11 @@ class MTRNullableBooleanAttributeCallbackSubscriptionBridge : public MTRNullable class MTRInt8uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, uint8_t value); }; @@ -1324,11 +1327,13 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall public: MTRInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt8uAttributeCallbackBridge(queue, handler, action, true), + MTRInt8uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt8uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt8uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1337,12 +1342,11 @@ class MTRInt8uAttributeCallbackSubscriptionBridge : public MTRInt8uAttributeCall class MTRNullableInt8uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt8uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1352,11 +1356,13 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn public: MTRNullableInt8uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt8uAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt8uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt8uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt8uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1365,12 +1371,11 @@ class MTRNullableInt8uAttributeCallbackSubscriptionBridge : public MTRNullableIn class MTRInt8sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, int8_t value); }; @@ -1380,11 +1385,13 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall public: MTRInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt8sAttributeCallbackBridge(queue, handler, action, true), + MTRInt8sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt8sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt8sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1393,12 +1400,11 @@ class MTRInt8sAttributeCallbackSubscriptionBridge : public MTRInt8sAttributeCall class MTRNullableInt8sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt8sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1408,11 +1414,13 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn public: MTRNullableInt8sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt8sAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt8sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt8sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt8sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1421,12 +1429,11 @@ class MTRNullableInt8sAttributeCallbackSubscriptionBridge : public MTRNullableIn class MTRInt16uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, uint16_t value); }; @@ -1436,11 +1443,13 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa public: MTRInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt16uAttributeCallbackBridge(queue, handler, action, true), + MTRInt16uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt16uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt16uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1449,12 +1458,11 @@ class MTRInt16uAttributeCallbackSubscriptionBridge : public MTRInt16uAttributeCa class MTRNullableInt16uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt16uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1464,11 +1472,13 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt16uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt16uAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt16uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt16uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt16uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1477,12 +1487,11 @@ class MTRNullableInt16uAttributeCallbackSubscriptionBridge : public MTRNullableI class MTRInt16sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, int16_t value); }; @@ -1492,11 +1501,13 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa public: MTRInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt16sAttributeCallbackBridge(queue, handler, action, true), + MTRInt16sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt16sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt16sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1505,12 +1516,11 @@ class MTRInt16sAttributeCallbackSubscriptionBridge : public MTRInt16sAttributeCa class MTRNullableInt16sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt16sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1520,11 +1530,13 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt16sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt16sAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt16sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt16sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt16sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1533,12 +1545,11 @@ class MTRNullableInt16sAttributeCallbackSubscriptionBridge : public MTRNullableI class MTRInt32uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, uint32_t value); }; @@ -1548,11 +1559,13 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa public: MTRInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt32uAttributeCallbackBridge(queue, handler, action, true), + MTRInt32uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt32uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt32uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1561,12 +1574,11 @@ class MTRInt32uAttributeCallbackSubscriptionBridge : public MTRInt32uAttributeCa class MTRNullableInt32uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt32uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1576,11 +1588,13 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt32uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt32uAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt32uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt32uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt32uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1589,12 +1603,11 @@ class MTRNullableInt32uAttributeCallbackSubscriptionBridge : public MTRNullableI class MTRInt32sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, int32_t value); }; @@ -1604,11 +1617,13 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa public: MTRInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt32sAttributeCallbackBridge(queue, handler, action, true), + MTRInt32sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt32sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt32sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1617,12 +1632,11 @@ class MTRInt32sAttributeCallbackSubscriptionBridge : public MTRInt32sAttributeCa class MTRNullableInt32sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt32sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1632,11 +1646,13 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt32sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt32sAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt32sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt32sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt32sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1645,12 +1661,11 @@ class MTRNullableInt32sAttributeCallbackSubscriptionBridge : public MTRNullableI class MTRInt64uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, uint64_t value); }; @@ -1660,11 +1675,13 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa public: MTRInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt64uAttributeCallbackBridge(queue, handler, action, true), + MTRInt64uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt64uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt64uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1673,12 +1690,11 @@ class MTRInt64uAttributeCallbackSubscriptionBridge : public MTRInt64uAttributeCa class MTRNullableInt64uAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt64uAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1688,11 +1704,13 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt64uAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt64uAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt64uAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt64uAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt64uAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1701,12 +1719,11 @@ class MTRNullableInt64uAttributeCallbackSubscriptionBridge : public MTRNullableI class MTRInt64sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, int64_t value); }; @@ -1716,11 +1733,13 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa public: MTRInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRInt64sAttributeCallbackBridge(queue, handler, action, true), + MTRInt64sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRInt64sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRInt64sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1729,12 +1748,11 @@ class MTRInt64sAttributeCallbackSubscriptionBridge : public MTRInt64sAttributeCa class MTRNullableInt64sAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableInt64sAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1744,11 +1762,13 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI public: MTRNullableInt64sAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableInt64sAttributeCallbackBridge(queue, handler, action, true), + MTRNullableInt64sAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableInt64sAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableInt64sAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1757,12 +1777,11 @@ class MTRNullableInt64sAttributeCallbackSubscriptionBridge : public MTRNullableI class MTRFloatAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, float value); }; @@ -1772,11 +1791,13 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall public: MTRFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFloatAttributeCallbackBridge(queue, handler, action, true), + MTRFloatAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFloatAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFloatAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1785,12 +1806,11 @@ class MTRFloatAttributeCallbackSubscriptionBridge : public MTRFloatAttributeCall class MTRNullableFloatAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableFloatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1800,11 +1820,13 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl public: MTRNullableFloatAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFloatAttributeCallbackBridge(queue, handler, action, true), + MTRNullableFloatAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableFloatAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFloatAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1813,12 +1835,11 @@ class MTRNullableFloatAttributeCallbackSubscriptionBridge : public MTRNullableFl class MTRDoubleAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, double value); }; @@ -1828,11 +1849,13 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa public: MTRDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoubleAttributeCallbackBridge(queue, handler, action, true), + MTRDoubleAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoubleAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoubleAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1841,12 +1864,11 @@ class MTRDoubleAttributeCallbackSubscriptionBridge : public MTRDoubleAttributeCa class MTRNullableDoubleAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableDoubleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1856,11 +1878,13 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD public: MTRNullableDoubleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoubleAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoubleAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoubleAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoubleAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1869,12 +1893,11 @@ class MTRNullableDoubleAttributeCallbackSubscriptionBridge : public MTRNullableD class MTRVendorIdAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::VendorId value); }; @@ -1884,11 +1907,13 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu public: MTRVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRVendorIdAttributeCallbackBridge(queue, handler, action, true), + MTRVendorIdAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRVendorIdAttributeCallbackBridge::KeepAliveOnCallback; + using MTRVendorIdAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1897,12 +1922,11 @@ class MTRVendorIdAttributeCallbackSubscriptionBridge : public MTRVendorIdAttribu class MTRNullableVendorIdAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRNullableVendorIdAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -1912,11 +1936,13 @@ class MTRNullableVendorIdAttributeCallbackSubscriptionBridge : public MTRNullabl public: MTRNullableVendorIdAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableVendorIdAttributeCallbackBridge(queue, handler, action, true), + MTRNullableVendorIdAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableVendorIdAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableVendorIdAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1926,13 +1952,12 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -1944,11 +1969,13 @@ class MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRIdentifyGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIdentifyGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1958,13 +1985,12 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -1976,11 +2002,13 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRIdentifyAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIdentifyAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -1989,12 +2017,11 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRIdentifyAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIdentifyAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIdentifyAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIdentifyAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRIdentifyAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2005,11 +2032,13 @@ class MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge : public M MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRIdentifyAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIdentifyAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2019,13 +2048,12 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2037,11 +2065,13 @@ class MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2051,13 +2081,12 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2069,11 +2098,13 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2082,12 +2113,11 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRGroupsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2098,11 +2128,13 @@ class MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2112,13 +2144,12 @@ class MTRScenesGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRScenesGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2130,11 +2161,13 @@ class MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRScenesGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRScenesGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRScenesGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2144,13 +2177,12 @@ class MTRScenesAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRScenesAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2162,11 +2194,13 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRScenesAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRScenesAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRScenesAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2175,12 +2209,11 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRScenesAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRScenesAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2191,11 +2224,13 @@ class MTRScenesAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRScenesAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRScenesAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRScenesAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRScenesAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRScenesAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2205,13 +2240,12 @@ class MTROnOffGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROnOffGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTROnOffGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2223,11 +2257,13 @@ class MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROnOffGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2237,13 +2273,11 @@ class MTROnOffAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROnOffAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTROnOffAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2255,11 +2289,13 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROnOffAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2268,12 +2304,11 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTROnOffAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROnOffAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTROnOffAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2284,11 +2319,13 @@ class MTROnOffAttributeListListAttributeCallbackSubscriptionBridge : public MTRO MTROnOffAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTROnOffAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2298,15 +2335,12 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2318,11 +2352,13 @@ class MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscr MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2332,15 +2368,12 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2352,11 +2385,13 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2366,14 +2401,12 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2385,11 +2418,13 @@ class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionB MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2399,13 +2434,12 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2417,11 +2451,13 @@ class MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRLevelControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2431,13 +2467,12 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2449,11 +2484,13 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRLevelControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2463,13 +2500,12 @@ class MTRLevelControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLevelControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLevelControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRLevelControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRLevelControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2481,11 +2517,13 @@ class MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRLevelControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLevelControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2495,14 +2533,12 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2514,11 +2550,13 @@ class MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBr MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2528,14 +2566,12 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2547,11 +2583,13 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2561,13 +2599,12 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2579,11 +2616,13 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBinaryInputBasicAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2593,13 +2632,11 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorDeviceTypeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorDeviceTypeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDescriptorDeviceTypeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDescriptorDeviceTypeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -2614,11 +2651,13 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorDeviceTypeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorDeviceTypeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorDeviceTypeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2627,12 +2666,11 @@ class MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge class MTRDescriptorServerListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorServerListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorServerListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDescriptorServerListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDescriptorServerListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2643,11 +2681,13 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT MTRDescriptorServerListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorServerListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorServerListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorServerListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorServerListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2656,12 +2696,11 @@ class MTRDescriptorServerListListAttributeCallbackSubscriptionBridge : public MT class MTRDescriptorClientListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorClientListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorClientListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDescriptorClientListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDescriptorClientListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2672,11 +2711,13 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT MTRDescriptorClientListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorClientListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorClientListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorClientListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorClientListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2685,12 +2726,11 @@ class MTRDescriptorClientListListAttributeCallbackSubscriptionBridge : public MT class MTRDescriptorPartsListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorPartsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorPartsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDescriptorPartsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDescriptorPartsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2701,11 +2741,13 @@ class MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge : public MTR MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorPartsListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorPartsListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorPartsListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorPartsListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2715,13 +2757,12 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2733,11 +2774,13 @@ class MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2747,13 +2790,12 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2765,11 +2807,13 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2778,12 +2822,11 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRDescriptorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2795,11 +2838,13 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRDescriptorAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDescriptorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2808,12 +2853,11 @@ class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge class MTRBindingBindingListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBindingBindingListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBindingBindingListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBindingBindingListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBindingBindingListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -2825,11 +2869,13 @@ class MTRBindingBindingListAttributeCallbackSubscriptionBridge : public MTRBindi public: MTRBindingBindingListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBindingBindingListAttributeCallbackBridge(queue, handler, action, true), + MTRBindingBindingListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBindingBindingListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBindingBindingListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2839,13 +2885,12 @@ class MTRBindingGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBindingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBindingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBindingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2857,11 +2902,13 @@ class MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBindingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBindingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBindingGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2871,13 +2918,12 @@ class MTRBindingAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBindingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBindingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBindingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBindingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2889,11 +2935,13 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBindingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBindingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBindingAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2902,12 +2950,11 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRBindingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -2918,11 +2965,13 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRBindingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBindingAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBindingAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBindingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBindingAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2931,12 +2980,11 @@ class MTRBindingAttributeListListAttributeCallbackSubscriptionBridge : public MT class MTRAccessControlAclListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccessControlAclListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -2950,11 +2998,13 @@ class MTRAccessControlAclListAttributeCallbackSubscriptionBridge : public MTRAcc MTRAccessControlAclListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlAclListAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlAclListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlAclListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlAclListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2963,12 +3013,11 @@ class MTRAccessControlAclListAttributeCallbackSubscriptionBridge : public MTRAcc class MTRAccessControlExtensionListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlExtensionListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlExtensionListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlExtensionListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccessControlExtensionListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -2982,11 +3031,13 @@ class MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge : public MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlExtensionListAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlExtensionListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlExtensionListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlExtensionListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -2996,13 +3047,12 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3014,11 +3064,13 @@ class MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridg MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3028,13 +3080,12 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3046,11 +3097,13 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3060,13 +3113,12 @@ class MTRAccessControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccessControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3078,11 +3130,13 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3091,12 +3145,11 @@ class MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge class MTRActionsActionListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsActionListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsActionListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsActionListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsActionListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -3109,11 +3162,13 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc MTRActionsActionListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsActionListListAttributeCallbackBridge(queue, handler, action, true), + MTRActionsActionListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsActionListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsActionListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3122,12 +3177,11 @@ class MTRActionsActionListListAttributeCallbackSubscriptionBridge : public MTRAc class MTRActionsEndpointListsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsEndpointListsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsEndpointListsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsEndpointListsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsEndpointListsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -3141,11 +3195,13 @@ class MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge : public MT MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsEndpointListsListAttributeCallbackBridge(queue, handler, action, true), + MTRActionsEndpointListsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsEndpointListsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsEndpointListsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3155,13 +3211,12 @@ class MTRActionsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRActionsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3173,11 +3228,13 @@ class MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRActionsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3187,13 +3244,12 @@ class MTRActionsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3205,11 +3261,13 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRActionsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3218,12 +3276,11 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRActionsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3234,11 +3291,13 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRActionsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRActionsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3247,12 +3306,11 @@ class MTRActionsAttributeListListAttributeCallbackSubscriptionBridge : public MT class MTRBasicCapabilityMinimaStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBasicCapabilityMinimaStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBasicCapabilityMinimaStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBasicCapabilityMinimaStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBasicCapabilityMinimaStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::DecodableType & value); @@ -3265,11 +3323,13 @@ class MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, handler, action, true), + MTRBasicCapabilityMinimaStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBasicCapabilityMinimaStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicCapabilityMinimaStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3279,13 +3339,12 @@ class MTRBasicGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3297,11 +3356,13 @@ class MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3311,13 +3372,11 @@ class MTRBasicAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3329,11 +3388,13 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3342,12 +3403,11 @@ class MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3358,11 +3418,13 @@ class MTRBasicAttributeListListAttributeCallbackSubscriptionBridge : public MTRB MTRBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBasicAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBasicAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3372,15 +3434,13 @@ class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3392,11 +3452,13 @@ class MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubsc MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3406,15 +3468,12 @@ class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3426,11 +3485,13 @@ class MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3440,14 +3501,12 @@ class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3459,11 +3518,13 @@ class MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscription MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3473,15 +3534,13 @@ class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -3495,11 +3554,13 @@ class MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubsc MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3509,15 +3570,13 @@ class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBrid : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3529,11 +3588,13 @@ class MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubs MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3543,15 +3604,13 @@ class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3563,11 +3622,13 @@ class MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3577,14 +3638,12 @@ class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3596,11 +3655,13 @@ class MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptio MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3610,14 +3671,12 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3629,11 +3688,13 @@ class MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscript MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, handler, action, true), + MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3643,15 +3704,13 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3663,11 +3722,13 @@ class MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubsc MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3677,15 +3738,12 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3697,11 +3755,13 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3711,14 +3771,12 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3730,11 +3788,13 @@ class MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscription MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3744,15 +3804,12 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -3766,11 +3823,13 @@ class MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscr MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(queue, handler, action, true), + MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3780,15 +3839,12 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3800,11 +3856,13 @@ class MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscrip MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3814,14 +3872,12 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3833,11 +3889,13 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3847,14 +3905,12 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3866,11 +3922,13 @@ class MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBri MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3880,14 +3938,12 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3899,11 +3955,13 @@ class MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBr MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3913,14 +3971,12 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3932,11 +3988,13 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3946,13 +4004,12 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUnitLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUnitLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRUnitLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3964,11 +4021,13 @@ class MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRUnitLocalizationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUnitLocalizationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -3978,13 +4037,12 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -3996,11 +4054,13 @@ class MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4010,15 +4070,12 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4030,11 +4087,13 @@ class MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscr MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4044,15 +4103,12 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4064,11 +4120,13 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4078,14 +4136,12 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4097,11 +4153,13 @@ class MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionB MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4111,13 +4169,12 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); @@ -4130,11 +4187,13 @@ class MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4144,13 +4203,12 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); @@ -4163,11 +4221,13 @@ class MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4177,13 +4237,12 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); @@ -4196,11 +4255,13 @@ class MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4210,13 +4271,12 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4228,11 +4288,13 @@ class MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4242,13 +4304,12 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4260,11 +4321,13 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4274,13 +4337,11 @@ class MTRPowerSourceAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRPowerSourceAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4292,11 +4353,13 @@ class MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4306,15 +4369,12 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -4328,11 +4388,13 @@ class MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscr MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4342,14 +4404,12 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4361,11 +4421,13 @@ class MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscripti MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4375,14 +4437,12 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4394,11 +4454,13 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4408,13 +4470,12 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4426,11 +4487,13 @@ class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridg MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4440,13 +4503,12 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningNetworksListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningNetworksListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningNetworksListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -4461,11 +4523,13 @@ class MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningNetworksListAttributeCallbackBridge(queue, handler, action, true), + MTRNetworkCommissioningNetworksListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNetworkCommissioningNetworksListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4475,14 +4539,12 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4494,11 +4556,13 @@ class MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscripti MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4508,14 +4572,12 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4527,11 +4589,13 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4541,13 +4605,12 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4559,11 +4622,13 @@ class MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridg MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4573,14 +4638,12 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4592,11 +4655,13 @@ class MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBrid MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4606,13 +4671,12 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4624,11 +4688,13 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4638,13 +4704,12 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4656,11 +4721,13 @@ class MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRDiagnosticLogsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4670,14 +4737,12 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -4691,11 +4756,13 @@ class MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBri MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4705,14 +4772,12 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4724,11 +4789,13 @@ class MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscription MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4738,14 +4805,12 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4757,11 +4822,13 @@ class MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBri MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4771,14 +4838,12 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4790,11 +4855,13 @@ class MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionB MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4804,14 +4871,12 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4823,11 +4888,13 @@ class MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscription MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4837,14 +4904,12 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4856,11 +4921,13 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4870,13 +4937,12 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4888,11 +4954,13 @@ class MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4902,13 +4970,12 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -4923,11 +4990,13 @@ class MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(queue, handler, action, true), + MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4937,14 +5006,12 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4956,11 +5023,13 @@ class MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptio MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -4970,14 +5039,12 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4989,11 +5056,13 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5003,13 +5072,12 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5021,11 +5089,13 @@ class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5035,14 +5105,12 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -5056,11 +5124,13 @@ class MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscript MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5070,14 +5140,12 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -5091,11 +5159,13 @@ class MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscription MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5105,14 +5175,12 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable< @@ -5126,11 +5194,13 @@ class MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscripti MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5141,17 +5211,15 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall { public: MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -5166,11 +5234,13 @@ class MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCall MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5180,15 +5250,13 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBri : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -5202,11 +5270,13 @@ class MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSub MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5216,15 +5286,12 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5236,11 +5303,13 @@ class MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscr MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5250,15 +5319,12 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5270,11 +5336,13 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5284,14 +5352,12 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5303,11 +5369,13 @@ class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionB MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5317,15 +5385,12 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5337,11 +5402,13 @@ class MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscrip MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5351,14 +5418,12 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5370,11 +5435,13 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5384,14 +5451,12 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5403,11 +5468,13 @@ class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBri MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5417,15 +5484,13 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBrid : public MTRCallbackBridge { public: - MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5437,11 +5502,13 @@ class MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubs MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5451,15 +5518,13 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5471,11 +5536,13 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5485,14 +5552,12 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5504,11 +5569,13 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5518,14 +5585,12 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5537,11 +5602,13 @@ class MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscription MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5551,14 +5618,12 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5570,11 +5635,13 @@ class MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionB MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5584,13 +5651,12 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5602,11 +5668,13 @@ class MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5616,13 +5684,12 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5634,11 +5701,13 @@ class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSwitchGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSwitchGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5648,13 +5717,12 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSwitchAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSwitchAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSwitchAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRSwitchAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5666,11 +5734,13 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSwitchAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSwitchAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5679,12 +5749,11 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRSwitchAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRSwitchAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRSwitchAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSwitchAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRSwitchAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5695,11 +5764,13 @@ class MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge : public MTR MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRSwitchAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRSwitchAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRSwitchAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSwitchAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5709,15 +5780,13 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBrid : public MTRCallbackBridge { public: - MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5729,11 +5798,13 @@ class MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubs MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5743,15 +5814,13 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5763,11 +5832,13 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5777,14 +5848,12 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5796,11 +5865,13 @@ class MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptio MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5810,13 +5881,12 @@ class MTROperationalCredentialsNOCsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsNOCsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsNOCsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalCredentialsNOCsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsNOCsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -5831,11 +5901,13 @@ class MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsNOCsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5845,13 +5917,12 @@ class MTROperationalCredentialsFabricsListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsFabricsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsFabricsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsFabricsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -5865,11 +5936,13 @@ class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsFabricsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5879,15 +5952,13 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridg : public MTRCallbackBridge { public: - MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5899,11 +5970,13 @@ class MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubsc MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5913,15 +5986,12 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5933,11 +6003,13 @@ class MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscrip MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5947,14 +6019,12 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5966,11 +6036,13 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -5980,14 +6052,12 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -5999,11 +6069,13 @@ class MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBri MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6013,13 +6085,12 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -6033,11 +6104,13 @@ class MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6047,13 +6120,12 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -6067,11 +6139,13 @@ class MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6081,14 +6155,12 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6100,11 +6172,13 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscription MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6114,14 +6188,12 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6133,11 +6205,13 @@ class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionB MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6147,13 +6221,12 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6165,11 +6238,13 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6178,12 +6253,11 @@ class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge class MTRFixedLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -6196,11 +6270,13 @@ class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTR MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelLabelListListAttributeCallbackBridge(queue, handler, action, true), + MTRFixedLabelLabelListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFixedLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelLabelListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6210,13 +6286,12 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6228,11 +6303,13 @@ class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6242,13 +6319,12 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6260,11 +6336,13 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6273,12 +6351,11 @@ class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRFixedLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6290,11 +6367,13 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFixedLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6303,12 +6382,11 @@ class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge class MTRUserLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -6321,11 +6399,13 @@ class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRU MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelLabelListListAttributeCallbackBridge(queue, handler, action, true), + MTRUserLabelLabelListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUserLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelLabelListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6335,13 +6415,12 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6353,11 +6432,13 @@ class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6367,13 +6448,12 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6385,11 +6465,13 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6398,12 +6480,11 @@ class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRUserLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6414,11 +6495,13 @@ class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRUserLabelAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUserLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6428,13 +6511,12 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6446,11 +6528,13 @@ class MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6460,13 +6544,12 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6478,11 +6561,13 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6492,13 +6577,12 @@ class MTRBooleanStateAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBooleanStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBooleanStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBooleanStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRBooleanStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6510,11 +6594,13 @@ class MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBooleanStateAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBooleanStateAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBooleanStateAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6524,13 +6610,11 @@ class MTRModeSelectSupportedModesListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRModeSelectSupportedModesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRModeSelectSupportedModesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRModeSelectSupportedModesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRModeSelectSupportedModesListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -6545,11 +6629,13 @@ class MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, handler, action, true), + MTRModeSelectSupportedModesListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRModeSelectSupportedModesListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRModeSelectSupportedModesListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6559,13 +6645,12 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6577,11 +6662,13 @@ class MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRModeSelectGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6591,13 +6678,12 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6609,11 +6695,13 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRModeSelectAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6622,12 +6710,11 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRModeSelectAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRModeSelectAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRModeSelectAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRModeSelectAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRModeSelectAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6639,11 +6726,13 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRModeSelectAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRModeSelectAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRModeSelectAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRModeSelectAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6653,13 +6742,12 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6671,11 +6759,13 @@ class MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6685,13 +6775,12 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6703,11 +6792,13 @@ class MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockSupportedOperatingModesAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6717,13 +6808,12 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6735,11 +6825,13 @@ class MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6749,13 +6841,12 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6767,11 +6858,13 @@ class MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6781,13 +6874,12 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6799,11 +6891,13 @@ class MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6813,13 +6907,12 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6831,11 +6924,13 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6844,12 +6939,11 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRDoorLockAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6860,11 +6954,13 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6873,12 +6969,11 @@ class MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public M class MTRWindowCoveringConfigStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRWindowCoveringConfigStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6889,11 +6984,13 @@ class MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringConfigStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringConfigStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6903,13 +7000,12 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWindowCoveringOperationalStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6921,11 +7017,13 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringOperationalStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6934,12 +7032,11 @@ class MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge class MTRWindowCoveringModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRWindowCoveringModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6949,11 +7046,13 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo public: MTRWindowCoveringModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringModeAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6962,12 +7061,11 @@ class MTRWindowCoveringModeAttributeCallbackSubscriptionBridge : public MTRWindo class MTRWindowCoveringSafetyStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRWindowCoveringSafetyStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -6978,11 +7076,13 @@ class MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge : public MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringSafetyStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6992,14 +7092,12 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7011,11 +7109,13 @@ class MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBrid MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7025,13 +7125,12 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7043,11 +7142,13 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7057,13 +7158,12 @@ class MTRWindowCoveringAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7075,11 +7175,13 @@ class MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7089,14 +7191,12 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7108,11 +7208,13 @@ class MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBrid MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7122,13 +7224,12 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7140,11 +7241,13 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7154,13 +7257,12 @@ class MTRBarrierControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7172,11 +7274,13 @@ class MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBarrierControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBarrierControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7186,13 +7290,12 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -7204,11 +7307,13 @@ class MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridg MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, handler, action, true), + MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7218,15 +7323,13 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBri : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7238,11 +7341,13 @@ class MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSub MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7252,15 +7357,13 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBrid : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7272,11 +7375,13 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7286,14 +7391,12 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7305,11 +7408,13 @@ class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscripti MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7319,13 +7424,12 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7337,11 +7441,13 @@ class MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7351,13 +7457,12 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7369,11 +7474,13 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7382,12 +7489,11 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRThermostatAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7399,11 +7505,13 @@ class MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7413,13 +7521,12 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7431,11 +7538,13 @@ class MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRFanControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7445,13 +7554,12 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7463,11 +7571,13 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRFanControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7476,12 +7586,11 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRFanControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRFanControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7493,11 +7602,13 @@ class MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRFanControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFanControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7508,17 +7619,15 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa { public: MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : + ResponseHandler handler) : MTRCallbackBridge(queue, handler, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7530,11 +7639,13 @@ class MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCa MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7545,17 +7656,15 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal { public: MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7567,11 +7676,13 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7581,15 +7692,14 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackB : public MTRCallbackBridge { public: - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7601,11 +7711,13 @@ class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackS MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7615,13 +7727,12 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7633,11 +7744,13 @@ class MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7647,13 +7760,12 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7665,11 +7777,13 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7679,13 +7793,12 @@ class MTRColorControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7697,11 +7810,13 @@ class MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7711,14 +7826,12 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7730,11 +7843,13 @@ class MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscripti MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7744,14 +7859,12 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7763,11 +7876,13 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7777,13 +7892,12 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRBallastConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7795,11 +7909,13 @@ class MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridg MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRBallastConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7809,15 +7925,12 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7829,11 +7942,13 @@ class MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscrip MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7843,14 +7958,12 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7862,11 +7975,13 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7876,14 +7991,12 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7895,11 +8008,13 @@ class MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBri MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7909,15 +8024,12 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7929,11 +8041,13 @@ class MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscrip MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7943,14 +8057,12 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7962,11 +8074,13 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7976,14 +8090,12 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -7995,11 +8107,13 @@ class MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBri MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8009,14 +8123,12 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8028,11 +8140,13 @@ class MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptio MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8042,14 +8156,12 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8061,11 +8173,13 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8075,13 +8189,12 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8093,11 +8206,13 @@ class MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRPressureMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8107,14 +8222,12 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8126,11 +8239,13 @@ class MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBri MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8140,14 +8255,12 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8159,11 +8272,13 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8173,13 +8288,12 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8191,11 +8305,13 @@ class MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRFlowMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8205,15 +8321,13 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBri : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8225,11 +8339,13 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8239,15 +8355,13 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBrid : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8259,11 +8373,13 @@ class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubs MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8273,14 +8389,12 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8292,11 +8406,13 @@ class MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscripti MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8306,14 +8422,12 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8325,11 +8439,13 @@ class MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBr MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8339,14 +8455,12 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8358,11 +8472,13 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8372,13 +8488,12 @@ class MTROccupancySensingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8390,11 +8505,13 @@ class MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTROccupancySensingAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROccupancySensingAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8404,13 +8521,12 @@ class MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8422,11 +8538,13 @@ class MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8436,13 +8554,12 @@ class MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8454,11 +8571,13 @@ class MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8467,12 +8586,11 @@ class MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRWakeOnLanAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8483,11 +8601,13 @@ class MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRWakeOnLanAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWakeOnLanAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLanAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8496,12 +8616,11 @@ class MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge : public class MTRChannelChannelListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRChannelChannelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -8514,11 +8633,13 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC MTRChannelChannelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelChannelListListAttributeCallbackBridge(queue, handler, action, true), + MTRChannelChannelListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelChannelListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelChannelListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8527,12 +8648,11 @@ class MTRChannelChannelListListAttributeCallbackSubscriptionBridge : public MTRC class MTRChannelLineupStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -8545,11 +8665,13 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan MTRChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelLineupStructAttributeCallbackBridge(queue, handler, action, true), + MTRChannelLineupStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelLineupStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelLineupStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8558,12 +8680,11 @@ class MTRChannelLineupStructAttributeCallbackSubscriptionBridge : public MTRChan class MTRChannelCurrentChannelStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -8577,11 +8698,13 @@ class MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, handler, action, true), + MTRChannelCurrentChannelStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelCurrentChannelStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelCurrentChannelStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8591,13 +8714,12 @@ class MTRChannelGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRChannelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8609,11 +8731,13 @@ class MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRChannelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8623,13 +8747,12 @@ class MTRChannelAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRChannelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8641,11 +8764,13 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRChannelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8654,12 +8779,11 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRChannelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8670,11 +8794,13 @@ class MTRChannelAttributeListListAttributeCallbackSubscriptionBridge : public MT MTRChannelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRChannelAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8684,13 +8810,12 @@ class MTRTargetNavigatorTargetListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTargetNavigatorTargetListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -8705,11 +8830,13 @@ class MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, handler, action, true), + MTRTargetNavigatorTargetListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTargetNavigatorTargetListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8719,14 +8846,12 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8738,11 +8863,13 @@ class MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBri MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8752,14 +8879,12 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8771,11 +8896,13 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8785,13 +8912,12 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTargetNavigatorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTargetNavigatorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTargetNavigatorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8803,11 +8929,13 @@ class MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRTargetNavigatorAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8817,13 +8945,12 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -8837,11 +8964,13 @@ class MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, handler, action, true), + MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8851,13 +8980,12 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8869,11 +8997,13 @@ class MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridg MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8883,13 +9013,12 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8901,11 +9030,13 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8915,13 +9046,12 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8933,11 +9063,13 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaPlaybackAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8946,12 +9078,11 @@ class MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge class MTRMediaInputInputListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRMediaInputInputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -8964,11 +9095,13 @@ class MTRMediaInputInputListListAttributeCallbackSubscriptionBridge : public MTR MTRMediaInputInputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputInputListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaInputInputListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaInputInputListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputInputListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8978,13 +9111,12 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -8996,11 +9128,13 @@ class MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9010,13 +9144,12 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9028,11 +9161,13 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9041,12 +9176,11 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRMediaInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9058,11 +9192,13 @@ class MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRMediaInputAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9072,13 +9208,12 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9090,11 +9225,13 @@ class MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRLowPowerGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9104,13 +9241,12 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9122,11 +9258,13 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRLowPowerAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9135,12 +9273,11 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge class MTRLowPowerAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9151,11 +9288,13 @@ class MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge : public M MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLowPowerAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRLowPowerAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLowPowerAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9165,13 +9304,12 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9183,11 +9321,13 @@ class MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9197,13 +9337,12 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9215,11 +9354,13 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9229,13 +9370,11 @@ class MTRKeypadInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9247,11 +9386,13 @@ class MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRKeypadInputAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRKeypadInputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9261,13 +9402,12 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9279,11 +9419,13 @@ class MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherAcceptHeaderListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9293,14 +9435,12 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9312,11 +9452,13 @@ class MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBri MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9326,14 +9468,12 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9345,11 +9485,13 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9359,13 +9501,12 @@ class MTRContentLauncherAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9377,11 +9518,13 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9390,12 +9533,11 @@ class MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge class MTRAudioOutputOutputListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAudioOutputOutputListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -9408,11 +9550,13 @@ class MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge : public M MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputOutputListListAttributeCallbackBridge(queue, handler, action, true), + MTRAudioOutputOutputListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAudioOutputOutputListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputOutputListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9422,13 +9566,12 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9440,11 +9583,13 @@ class MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9454,13 +9599,12 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9472,11 +9616,13 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9486,13 +9632,11 @@ class MTRAudioOutputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9504,11 +9648,13 @@ class MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRAudioOutputAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAudioOutputAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9518,13 +9664,12 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationLauncherCatalogListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationLauncherCatalogListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherCatalogListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9536,11 +9681,13 @@ class MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationLauncherCatalogListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9550,13 +9697,12 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -9571,11 +9717,13 @@ class MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9585,14 +9733,12 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9604,11 +9750,13 @@ class MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptio MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9618,14 +9766,12 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9637,11 +9783,13 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9651,13 +9799,12 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9669,11 +9816,13 @@ class MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationLauncherAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9683,13 +9832,12 @@ class MTRApplicationBasicApplicationStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationBasicApplicationStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -9703,11 +9851,13 @@ class MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationBasicApplicationStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationBasicApplicationStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9717,13 +9867,12 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9735,11 +9884,13 @@ class MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridg MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9749,14 +9900,12 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9768,11 +9917,13 @@ class MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBr MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9782,14 +9933,12 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9801,11 +9950,13 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBri MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9815,13 +9966,12 @@ class MTRApplicationBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9833,11 +9983,13 @@ class MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationBasicAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationBasicAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9847,13 +9999,12 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9865,11 +10016,13 @@ class MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9879,13 +10032,12 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9897,11 +10049,13 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9911,13 +10065,12 @@ class MTRAccountLoginAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9929,11 +10082,13 @@ class MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRAccountLoginAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccountLoginAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9943,14 +10098,12 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9962,11 +10115,13 @@ class MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscript MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -9976,14 +10131,12 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -9995,11 +10148,13 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10009,14 +10164,12 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10028,11 +10181,13 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10041,12 +10196,11 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid class MTRTestClusterBitmap8AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -10056,11 +10210,13 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC public: MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterBitmap8AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterBitmap8AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterBitmap8AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterBitmap8AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10069,12 +10225,11 @@ class MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge : public MTRTestC class MTRTestClusterBitmap16AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -10085,11 +10240,13 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterBitmap16AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterBitmap16AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterBitmap16AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterBitmap16AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10098,12 +10255,11 @@ class MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge : public MTRTest class MTRTestClusterBitmap32AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -10114,11 +10270,13 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterBitmap32AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterBitmap32AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterBitmap32AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterBitmap32AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10127,12 +10285,11 @@ class MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge : public MTRTest class MTRTestClusterBitmap64AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::BitMask value); }; @@ -10143,11 +10300,13 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterBitmap64AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterBitmap64AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterBitmap64AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterBitmap64AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10156,12 +10315,11 @@ class MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge : public MTRTest class MTRTestClusterListInt8uListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterListInt8uListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10172,11 +10330,13 @@ class MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge : public MT MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterListInt8uListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterListInt8uListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterListInt8uListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterListInt8uListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10186,13 +10346,12 @@ class MTRTestClusterListOctetStringListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterListOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10204,11 +10363,13 @@ class MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterListOctetStringListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterListOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterListOctetStringListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10218,13 +10379,12 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterListStructOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -10239,11 +10399,13 @@ class MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterListStructOctetStringListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterListStructOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterListStructOctetStringListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10253,15 +10415,12 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< @@ -10275,11 +10434,13 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10288,12 +10449,11 @@ class MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscrip class MTRTestClusterStructAttrStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterStructAttrStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & value); }; @@ -10305,11 +10465,13 @@ class MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterStructAttrStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterStructAttrStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterStructAttrStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10319,13 +10481,12 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterListLongOctetStringListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10337,11 +10498,13 @@ class MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterListLongOctetStringListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterListLongOctetStringListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterListLongOctetStringListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10351,13 +10514,12 @@ class MTRTestClusterListFabricScopedListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterListFabricScopedListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -10372,11 +10534,13 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterListFabricScopedListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterListFabricScopedListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterListFabricScopedListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10385,12 +10549,11 @@ class MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge class MTRTestClusterNullableBitmap8AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10403,11 +10566,13 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterNullableBitmap8AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterNullableBitmap8AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterNullableBitmap8AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10416,12 +10581,11 @@ class MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge : public class MTRTestClusterNullableBitmap16AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10435,11 +10599,13 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterNullableBitmap16AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterNullableBitmap16AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterNullableBitmap16AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10448,12 +10614,11 @@ class MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge class MTRTestClusterNullableBitmap32AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10467,11 +10632,13 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterNullableBitmap32AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterNullableBitmap32AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterNullableBitmap32AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10480,12 +10647,11 @@ class MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge class MTRTestClusterNullableBitmap64AttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10499,11 +10665,13 @@ class MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterNullableBitmap64AttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterNullableBitmap64AttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterNullableBitmap64AttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10513,13 +10681,12 @@ class MTRTestClusterNullableStructStructAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterNullableStructStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -10533,11 +10700,13 @@ class MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterNullableStructStructAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterNullableStructStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterNullableStructStructAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10547,13 +10716,12 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10565,11 +10733,13 @@ class MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10579,13 +10749,12 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10597,11 +10766,13 @@ class MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10611,13 +10782,11 @@ class MTRTestClusterAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -10629,11 +10798,13 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterAttributeListListAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10642,12 +10813,11 @@ class MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsClusterAddGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data); }; @@ -10655,12 +10825,11 @@ class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge< class MTRGroupsClusterViewGroupResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data); }; @@ -10669,13 +10838,12 @@ class MTRGroupsClusterGetGroupMembershipResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsClusterGetGroupMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data); @@ -10684,12 +10852,11 @@ class MTRGroupsClusterGetGroupMembershipResponseCallbackBridge class MTRGroupsClusterRemoveGroupResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRGroupsClusterRemoveGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data); }; @@ -10697,12 +10864,11 @@ class MTRGroupsClusterRemoveGroupResponseCallbackBridge : public MTRCallbackBrid class MTRScenesClusterAddSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data); }; @@ -10710,12 +10876,11 @@ class MTRScenesClusterAddSceneResponseCallbackBridge : public MTRCallbackBridge< class MTRScenesClusterViewSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); }; @@ -10723,12 +10888,11 @@ class MTRScenesClusterViewSceneResponseCallbackBridge : public MTRCallbackBridge class MTRScenesClusterRemoveSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data); }; @@ -10737,12 +10901,11 @@ class MTRScenesClusterRemoveAllScenesResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterRemoveAllScenesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data); @@ -10751,12 +10914,11 @@ class MTRScenesClusterRemoveAllScenesResponseCallbackBridge class MTRScenesClusterStoreSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterStoreSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data); }; @@ -10765,13 +10927,12 @@ class MTRScenesClusterGetSceneMembershipResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data); @@ -10781,13 +10942,11 @@ class MTRScenesClusterEnhancedAddSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data); @@ -10797,13 +10956,12 @@ class MTRScenesClusterEnhancedViewSceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data); @@ -10812,12 +10970,11 @@ class MTRScenesClusterEnhancedViewSceneResponseCallbackBridge class MTRScenesClusterCopySceneResponseCallbackBridge : public MTRCallbackBridge { public: - MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); }; @@ -10826,14 +10983,12 @@ class MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10844,15 +10999,12 @@ class MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10863,14 +11015,12 @@ class MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data); @@ -10880,15 +11030,13 @@ class MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10899,15 +11047,13 @@ class MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10918,14 +11064,12 @@ class MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data); @@ -10935,14 +11079,12 @@ class MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); @@ -10952,14 +11094,12 @@ class MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -10970,13 +11110,12 @@ class MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data); @@ -10986,14 +11125,12 @@ class MTROperationalCredentialsClusterAttestationResponseCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsClusterAttestationResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data); @@ -11003,15 +11140,12 @@ class MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -11022,13 +11156,12 @@ class MTROperationalCredentialsClusterCSRResponseCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data); @@ -11038,13 +11171,12 @@ class MTROperationalCredentialsClusterNOCResponseCallbackBridge : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsClusterNOCResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data); @@ -11054,14 +11186,12 @@ class MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data); @@ -11071,15 +11201,12 @@ class MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -11090,13 +11217,12 @@ class MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data); @@ -11106,13 +11232,12 @@ class MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data); @@ -11122,13 +11247,12 @@ class MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data); @@ -11137,12 +11261,11 @@ class MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge class MTRDoorLockClusterGetUserResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data); }; @@ -11151,12 +11274,11 @@ class MTRDoorLockClusterSetCredentialResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterSetCredentialResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data); @@ -11166,13 +11288,12 @@ class MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data); @@ -11182,13 +11303,12 @@ class MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data); @@ -11198,12 +11318,11 @@ class MTRChannelClusterChangeChannelResponseCallbackBridge : public MTRCallbackBridge { public: - MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRChannelClusterChangeChannelResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data); @@ -11213,14 +11332,12 @@ class MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data); @@ -11230,12 +11347,11 @@ class MTRMediaPlaybackClusterPlaybackResponseCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackClusterPlaybackResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data); @@ -11244,12 +11360,11 @@ class MTRMediaPlaybackClusterPlaybackResponseCallbackBridge class MTRKeypadInputClusterSendKeyResponseCallbackBridge : public MTRCallbackBridge { public: - MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRKeypadInputClusterSendKeyResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data); @@ -11259,12 +11374,11 @@ class MTRContentLauncherClusterLaunchResponseCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherClusterLaunchResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherClusterLaunchResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRContentLauncherClusterLaunchResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRContentLauncherClusterLaunchResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::DecodableType & data); @@ -11274,13 +11388,12 @@ class MTRApplicationLauncherClusterLauncherResponseCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherClusterLauncherResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data); @@ -11290,13 +11403,12 @@ class MTRAccountLoginClusterGetSetupPINResponseCallbackBridge : public MTRCallbackBridge { public: - MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccountLoginClusterGetSetupPINResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data); @@ -11306,13 +11418,12 @@ class MTRTestClusterClusterTestSpecificResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data); @@ -11322,13 +11433,12 @@ class MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data); @@ -11338,14 +11448,12 @@ class MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & data); @@ -11355,14 +11463,12 @@ class MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -11373,14 +11479,12 @@ class MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data); @@ -11390,12 +11494,11 @@ class MTRTestClusterClusterTestEnumsResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data); @@ -11405,14 +11508,12 @@ class MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data); @@ -11422,15 +11523,12 @@ class MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -11440,12 +11538,11 @@ class MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge class MTRTestClusterClusterBooleanResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data); @@ -11455,13 +11552,12 @@ class MTRTestClusterClusterSimpleStructResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data); @@ -11471,14 +11567,12 @@ class MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); @@ -11488,15 +11582,13 @@ class MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -11507,14 +11599,12 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyEffectIdentifier value); }; @@ -11526,11 +11616,13 @@ class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBri MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, handler, action, true), + MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11540,15 +11632,12 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -11561,11 +11650,13 @@ class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscri MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, handler, action, true), + MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11575,13 +11666,12 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyEffectVariant value); }; @@ -11593,11 +11683,13 @@ class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, handler, action, true), + MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11607,14 +11699,12 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -11627,11 +11717,13 @@ class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscripti MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, handler, action, true), + MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11641,13 +11733,12 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyIdentifyType value); }; @@ -11659,11 +11750,13 @@ class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, handler, action, true), + MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11673,14 +11766,12 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -11693,11 +11784,13 @@ class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptio MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11707,14 +11800,12 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant value); }; @@ -11726,11 +11817,13 @@ class MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptio MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action, true), + MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11740,15 +11833,13 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBri : public MTRCallbackBridge { public: - MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -11762,11 +11853,13 @@ class MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSub MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11776,14 +11869,12 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant value); }; @@ -11795,11 +11886,13 @@ class MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBr MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action, true), + MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11809,15 +11902,12 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -11830,11 +11920,13 @@ class MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscr MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffDyingLightEffectVariantAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11844,13 +11936,12 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffEffectIdentifier value); }; @@ -11862,11 +11953,13 @@ class MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge MTROnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action, true), + MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11876,14 +11969,12 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -11896,11 +11987,13 @@ class MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionB MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffEffectIdentifierAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11910,13 +12003,12 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OnOff::OnOffStartUpOnOff value); }; @@ -11928,11 +12020,13 @@ class MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge MTROnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action, true), + MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11942,13 +12036,12 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -11961,11 +12054,13 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -11974,12 +12069,11 @@ class MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridg class MTRLevelControlClusterMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::LevelControl::MoveMode value); }; @@ -11991,11 +12085,13 @@ class MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge MTRLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action, true), + MTRLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12005,13 +12101,12 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12024,11 +12119,13 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableLevelControlClusterMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12037,12 +12134,11 @@ class MTRNullableLevelControlClusterMoveModeAttributeCallbackSubscriptionBridge class MTRLevelControlClusterStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::LevelControl::StepMode value); }; @@ -12054,11 +12150,13 @@ class MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge MTRLevelControlClusterStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action, true), + MTRLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlClusterStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12068,13 +12166,12 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12087,11 +12184,13 @@ class MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge MTRNullableLevelControlClusterStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableLevelControlClusterStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableLevelControlClusterStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12101,13 +12200,11 @@ class MTRAccessControlClusterAuthModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::AuthMode value); }; @@ -12119,11 +12216,13 @@ class MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge MTRAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlClusterAuthModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlClusterAuthModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterAuthModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12133,13 +12232,12 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12152,11 +12250,13 @@ class MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge MTRNullableAccessControlClusterAuthModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterAuthModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12166,13 +12266,12 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::ChangeTypeEnum value); }; @@ -12184,11 +12283,13 @@ class MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge MTRAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12198,14 +12299,12 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12218,11 +12317,13 @@ class MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscription MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterChangeTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12232,13 +12333,12 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::AccessControl::Privilege value); }; @@ -12250,11 +12350,13 @@ class MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge MTRAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, handler, action, true), + MTRAccessControlClusterPrivilegeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAccessControlClusterPrivilegeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlClusterPrivilegeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12264,13 +12366,12 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12283,11 +12384,13 @@ class MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridg MTRNullableAccessControlClusterPrivilegeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAccessControlClusterPrivilegeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12297,13 +12400,12 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionErrorEnum value); }; @@ -12315,11 +12417,13 @@ class MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action, true), + MTRActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12329,13 +12433,12 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12348,11 +12451,13 @@ class MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridg MTRNullableActionsClusterActionErrorEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterActionErrorEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12362,13 +12467,12 @@ class MTRActionsClusterActionStateEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionStateEnum value); }; @@ -12380,11 +12484,13 @@ class MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action, true), + MTRActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12394,13 +12500,12 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12413,11 +12518,13 @@ class MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridg MTRNullableActionsClusterActionStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterActionStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12427,13 +12534,11 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Actions::ActionTypeEnum value); }; @@ -12445,11 +12550,13 @@ class MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge MTRActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12459,13 +12566,12 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12478,11 +12584,13 @@ class MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge MTRNullableActionsClusterActionTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterActionTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12492,13 +12600,12 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Actions::EndpointListTypeEnum value); }; @@ -12510,11 +12617,13 @@ class MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge MTRActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12524,14 +12633,12 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -12544,11 +12651,13 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12558,15 +12667,14 @@ class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBr : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value); }; @@ -12578,11 +12686,13 @@ class MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSu MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12593,17 +12703,15 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa { public: MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : + ResponseHandler handler) : MTRCallbackBridge(queue, handler, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -12617,11 +12725,13 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCa MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12631,15 +12741,13 @@ class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBri : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTADownloadProtocol value); }; @@ -12651,11 +12759,13 @@ class MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSub MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12666,17 +12776,15 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal { public: MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -12690,11 +12798,13 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCal MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12704,15 +12814,12 @@ class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAQueryStatus value); }; @@ -12724,11 +12831,13 @@ class MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscrip MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12739,16 +12848,14 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback { public: MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : + ResponseHandler handler, + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -12762,11 +12869,13 @@ class MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallback MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOtaSoftwareUpdateProviderClusterOTAQueryStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12777,16 +12886,14 @@ class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback { public: MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : + ResponseHandler handler, + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAAnnouncementReason value); }; @@ -12798,11 +12905,13 @@ class MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallback MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12813,17 +12922,15 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute { public: MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge( - queue, handler, OnSuccessFn, keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -12837,11 +12944,13 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttribute MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12851,15 +12960,14 @@ class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBr : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum value); }; @@ -12871,11 +12979,13 @@ class MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSu MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12886,17 +12996,15 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa { public: MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : + ResponseHandler handler) : MTRCallbackBridge(queue, handler, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -12910,11 +13018,13 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCa MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12924,15 +13034,13 @@ class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBri : public MTRCallbackBridge { public: - MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value); }; @@ -12944,11 +13052,13 @@ class MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSub MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action, true), + MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12959,17 +13069,15 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal { public: MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -12983,11 +13091,13 @@ class MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCal MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -12997,14 +13107,12 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::TimeFormatLocalization::CalendarType value); }; @@ -13016,11 +13124,13 @@ class MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionB MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, handler, action, true), + MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13030,15 +13140,13 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -13052,11 +13160,13 @@ class MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubsc MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13066,14 +13176,12 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::TimeFormatLocalization::HourFormat value); }; @@ -13085,11 +13193,13 @@ class MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBri MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, handler, action, true), + MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13099,15 +13209,12 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13120,11 +13227,13 @@ class MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscri MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, handler, action, true), + MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13134,13 +13243,12 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::UnitLocalization::TempUnit value); }; @@ -13152,11 +13260,13 @@ class MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, handler, action, true), + MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13166,14 +13276,12 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13186,11 +13294,13 @@ class MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBri MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, handler, action, true), + MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableUnitLocalizationClusterTempUnitAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13200,13 +13310,12 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeFault value); }; @@ -13218,11 +13327,13 @@ class MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13232,14 +13343,12 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13252,11 +13361,13 @@ class MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBr MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13266,13 +13377,12 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeLevel value); }; @@ -13284,11 +13394,13 @@ class MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13298,14 +13410,12 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13318,11 +13428,13 @@ class MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBr MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeLevelAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13332,13 +13444,12 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatChargeState value); }; @@ -13350,11 +13461,13 @@ class MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatChargeStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13364,14 +13477,12 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13384,11 +13495,13 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13397,12 +13510,11 @@ class MTRNullablePowerSourceClusterBatChargeStateAttributeCallbackSubscriptionBr class MTRPowerSourceClusterBatFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatFault value); }; @@ -13413,11 +13525,13 @@ class MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge : public MTRPowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterBatFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterBatFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13427,13 +13541,12 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13446,11 +13559,13 @@ class MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge MTRNullablePowerSourceClusterBatFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13460,13 +13575,12 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::BatReplaceability value); }; @@ -13478,11 +13592,13 @@ class MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge MTRPowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13492,14 +13608,12 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13512,11 +13626,13 @@ class MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptio MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterBatReplaceabilityAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13526,13 +13642,12 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::PowerSourceStatus value); }; @@ -13544,11 +13659,13 @@ class MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge MTRPowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13558,14 +13675,12 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13578,11 +13693,13 @@ class MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptio MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterPowerSourceStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13592,13 +13709,12 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredCurrentType value); }; @@ -13610,11 +13726,13 @@ class MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13624,14 +13742,12 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13644,11 +13760,13 @@ class MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscription MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterWiredCurrentTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13658,13 +13776,11 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PowerSource::WiredFault value); }; @@ -13676,11 +13792,13 @@ class MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge MTRPowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, handler, action, true), + MTRPowerSourceClusterWiredFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceClusterWiredFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13690,13 +13808,12 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13709,11 +13826,13 @@ class MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge MTRNullablePowerSourceClusterWiredFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePowerSourceClusterWiredFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13723,14 +13842,12 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralCommissioning::CommissioningError value); }; @@ -13742,11 +13859,13 @@ class MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscript MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13756,15 +13875,14 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackB : public MTRCallbackBridge { public: - MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -13778,11 +13896,13 @@ class MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackS MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralCommissioningClusterCommissioningErrorAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13792,15 +13912,13 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType value); }; @@ -13812,11 +13930,13 @@ class MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubsc MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13827,17 +13947,15 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb { public: MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -13851,11 +13969,13 @@ class MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallb MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13865,15 +13985,14 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackB : public MTRCallbackBridge { public: - MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatus value); }; @@ -13885,11 +14004,13 @@ class MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackS MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13900,17 +14021,15 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC { public: MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : + ResponseHandler handler) : MTRCallbackBridge(queue, handler, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -13924,11 +14043,13 @@ class MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeC MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13938,13 +14059,12 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::NetworkCommissioning::WiFiBand value); }; @@ -13956,11 +14076,13 @@ class MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge MTRNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, handler, action, true), + MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -13970,14 +14092,12 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -13990,11 +14110,13 @@ class MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptio MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, handler, action, true), + MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableNetworkCommissioningClusterWiFiBandAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14004,13 +14126,12 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::LogsIntent value); }; @@ -14022,11 +14143,13 @@ class MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge MTRDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, handler, action, true), + MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14036,14 +14159,12 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -14056,11 +14177,13 @@ class MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBri MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDiagnosticLogsClusterLogsIntentAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14070,13 +14193,12 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::LogsStatus value); }; @@ -14088,11 +14210,13 @@ class MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge MTRDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, handler, action, true), + MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14102,14 +14226,12 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -14122,11 +14244,13 @@ class MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBri MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDiagnosticLogsClusterLogsStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14136,14 +14260,12 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DiagnosticLogs::LogsTransferProtocol value); }; @@ -14155,11 +14277,13 @@ class MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionB MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, handler, action, true), + MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14169,15 +14293,13 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14191,11 +14313,13 @@ class MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubsc MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDiagnosticLogsClusterLogsTransferProtocolAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14205,14 +14329,12 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::BootReasonType value); }; @@ -14224,11 +14346,13 @@ class MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBri MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14238,15 +14362,12 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -14259,11 +14380,13 @@ class MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscri MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterBootReasonTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14273,14 +14396,12 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::HardwareFaultType value); }; @@ -14292,11 +14413,13 @@ class MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscription MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14306,15 +14429,13 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBrid : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14328,11 +14449,13 @@ class MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubs MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterHardwareFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14342,14 +14465,12 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::InterfaceType value); }; @@ -14361,11 +14482,13 @@ class MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBrid MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14375,15 +14498,12 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -14396,11 +14516,13 @@ class MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscrip MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterInterfaceTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14410,14 +14532,12 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::NetworkFaultType value); }; @@ -14429,11 +14549,13 @@ class MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionB MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14443,15 +14565,13 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14465,11 +14585,13 @@ class MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubsc MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterNetworkFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14479,14 +14601,12 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GeneralDiagnostics::RadioFaultType value); }; @@ -14498,11 +14618,13 @@ class MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBri MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14512,15 +14634,12 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -14533,11 +14652,13 @@ class MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscri MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGeneralDiagnosticsClusterRadioFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14547,14 +14668,12 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFault value); }; @@ -14566,11 +14685,13 @@ class MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptio MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14580,15 +14701,13 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBri : public MTRCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14602,11 +14721,13 @@ class MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSub MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThreadNetworkDiagnosticsClusterNetworkFaultAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14616,14 +14737,12 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::RoutingRole value); }; @@ -14635,11 +14754,13 @@ class MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscription MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14649,15 +14770,13 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBrid : public MTRCallbackBridge { public: - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14671,11 +14790,13 @@ class MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubs MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14685,15 +14806,14 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackB : public MTRCallbackBridge { public: - MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ThreadNetworkDiagnostics::ThreadConnectionStatus value); }; @@ -14705,11 +14825,13 @@ class MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackS MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, handler, action, true), + MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14720,17 +14842,15 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC { public: MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : + ResponseHandler handler) : MTRCallbackBridge(queue, handler, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -14744,11 +14864,13 @@ class MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeC MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14758,15 +14880,14 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBr : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCause value); }; @@ -14778,11 +14899,13 @@ class MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSu MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14793,17 +14916,15 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa { public: MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : + ResponseHandler handler) : MTRCallbackBridge(queue, handler, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14817,11 +14938,13 @@ class MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCa MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, handler, action, true), + MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14831,14 +14954,12 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::SecurityType value); }; @@ -14850,11 +14971,13 @@ class MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionB MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14864,15 +14987,13 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14886,11 +15007,13 @@ class MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubsc MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14900,15 +15023,13 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiConnectionStatus value); }; @@ -14920,11 +15041,13 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubsc MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14935,17 +15058,15 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb { public: MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -14959,11 +15080,13 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallb MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiConnectionStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -14973,14 +15096,12 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::WiFiNetworkDiagnostics::WiFiVersionType value); }; @@ -14992,11 +15113,13 @@ class MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscripti MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, handler, action, true), + MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15006,15 +15129,14 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBr : public MTRCallbackBridge { public: - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -15028,11 +15150,13 @@ class MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSu MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15042,14 +15166,12 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType value); }; @@ -15061,11 +15183,13 @@ class MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscripti MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, handler, action, true), + MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTREthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15075,15 +15199,14 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBr : public MTRCallbackBridge { public: - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -15097,11 +15220,13 @@ class MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSu MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15111,14 +15236,12 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::GranularityEnum value); }; @@ -15130,11 +15253,13 @@ class MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionB MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action, true), + MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15144,15 +15269,13 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -15166,11 +15289,13 @@ class MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubsc MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15180,14 +15305,12 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); }; @@ -15199,11 +15322,13 @@ class MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBr MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action, true), + MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15213,15 +15338,12 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15234,11 +15356,13 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15249,17 +15373,15 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall { public: MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus value); }; @@ -15271,11 +15393,13 @@ class MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCall MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, handler, action, true), + MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15286,17 +15410,15 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri { public: MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge( - queue, handler, OnSuccessFn, keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge( - queue, handler, action, OnSuccessFn, keepAlive){}; + queue, handler, action, OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -15310,11 +15432,13 @@ class MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttri MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15324,14 +15448,12 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::AdministratorCommissioning::StatusCode value); }; @@ -15343,11 +15465,13 @@ class MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptio MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action, true), + MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15357,15 +15481,13 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBri : public MTRCallbackBridge { public: - MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -15379,11 +15501,13 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15393,15 +15517,13 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBrid : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::OperationalCertStatus value); }; @@ -15413,11 +15535,13 @@ class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubs MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, handler, action, true), + MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15428,17 +15552,15 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall { public: MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -15452,11 +15574,13 @@ class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCall MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15466,15 +15590,12 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy value); }; @@ -15486,11 +15607,13 @@ class MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscri MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, handler, action, true), + MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15501,17 +15624,14 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac { public: MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -15525,11 +15645,13 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, handler, action, true), + MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15538,12 +15660,11 @@ class MTRNullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallbac class MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlAlarmCode value); }; @@ -15554,11 +15675,13 @@ class MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlAlarmCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15568,13 +15691,12 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15587,11 +15709,13 @@ class MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlAlarmCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15601,13 +15725,12 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlCredentialRule value); }; @@ -15619,11 +15742,13 @@ class MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlCredentialRuleAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15633,14 +15758,12 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15653,11 +15776,13 @@ class MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBri MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlCredentialRuleAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15667,13 +15792,12 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlCredentialType value); }; @@ -15685,11 +15809,13 @@ class MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlCredentialTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15699,14 +15825,12 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15719,11 +15843,13 @@ class MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBri MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlCredentialTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15733,13 +15859,12 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlDataOperationType value); }; @@ -15751,11 +15876,13 @@ class MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15765,14 +15892,12 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15785,11 +15910,13 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15798,12 +15925,11 @@ class MTRNullableDoorLockClusterDlDataOperationTypeAttributeCallbackSubscription class MTRDoorLockClusterDlDoorStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlDoorState value); }; @@ -15814,11 +15940,13 @@ class MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlDoorStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlDoorStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15828,13 +15956,12 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15847,11 +15974,13 @@ class MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15861,13 +15990,12 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockDataType value); }; @@ -15879,11 +16007,13 @@ class MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlLockDataTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15893,13 +16023,12 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15912,11 +16041,13 @@ class MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridg MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlLockDataTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15926,13 +16057,12 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockOperationType value); }; @@ -15944,11 +16074,13 @@ class MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15958,14 +16090,12 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -15978,11 +16108,13 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -15991,12 +16123,11 @@ class MTRNullableDoorLockClusterDlLockOperationTypeAttributeCallbackSubscription class MTRDoorLockClusterDlLockStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockState value); }; @@ -16007,11 +16138,13 @@ class MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge : public MTRDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16021,13 +16154,12 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16040,11 +16172,13 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16053,12 +16187,11 @@ class MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge class MTRDoorLockClusterDlLockTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlLockType value); }; @@ -16069,11 +16202,13 @@ class MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge : public M MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16083,13 +16218,12 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16102,11 +16236,13 @@ class MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlLockTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16116,13 +16252,12 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlOperatingMode value); }; @@ -16134,11 +16269,13 @@ class MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16148,14 +16285,12 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16168,11 +16303,13 @@ class MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBrid MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlOperatingModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16182,13 +16319,12 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlOperationError value); }; @@ -16200,11 +16336,13 @@ class MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlOperationErrorAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16214,14 +16352,12 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16234,11 +16370,13 @@ class MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBri MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlOperationErrorAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16248,13 +16386,12 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlOperationSource value); }; @@ -16266,11 +16403,13 @@ class MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlOperationSourceAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16280,14 +16419,12 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16300,11 +16437,13 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16313,12 +16452,11 @@ class MTRNullableDoorLockClusterDlOperationSourceAttributeCallbackSubscriptionBr class MTRDoorLockClusterDlStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlStatus value); }; @@ -16329,11 +16467,13 @@ class MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge : public MTR MTRDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16343,13 +16483,12 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); }; @@ -16361,11 +16500,13 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16374,12 +16515,11 @@ class MTRNullableDoorLockClusterDlStatusAttributeCallbackSubscriptionBridge class MTRDoorLockClusterDlUserStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlUserStatus value); }; @@ -16391,11 +16531,13 @@ class MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge MTRDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlUserStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlUserStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16405,13 +16547,12 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16424,11 +16565,13 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlUserStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16437,12 +16580,11 @@ class MTRNullableDoorLockClusterDlUserStatusAttributeCallbackSubscriptionBridge class MTRDoorLockClusterDlUserTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DlUserType value); }; @@ -16453,11 +16595,13 @@ class MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge : public M MTRDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDlUserTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDlUserTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16467,13 +16611,12 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16486,11 +16629,13 @@ class MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge MTRNullableDoorLockClusterDlUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDlUserTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16500,14 +16645,12 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockOperationEventCode value); }; @@ -16519,11 +16662,13 @@ class MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionB MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16533,15 +16678,13 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -16555,11 +16698,13 @@ class MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubsc MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockOperationEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16569,14 +16714,12 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode value); }; @@ -16588,11 +16731,13 @@ class MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptio MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16602,15 +16747,13 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBri : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -16624,11 +16767,13 @@ class MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSub MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockProgrammingEventCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16638,14 +16783,12 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus value); }; @@ -16657,11 +16800,13 @@ class MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBri MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16671,15 +16816,12 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16692,11 +16834,13 @@ class MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscri MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockSetPinOrIdStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16706,13 +16850,12 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockUserStatus value); }; @@ -16724,11 +16867,13 @@ class MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge MTRDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16738,14 +16883,12 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16758,11 +16901,13 @@ class MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionB MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockUserStatusAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16772,13 +16917,12 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::DoorLock::DoorLockUserType value); }; @@ -16790,11 +16934,13 @@ class MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge MTRDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, handler, action, true), + MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16804,14 +16950,12 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16824,11 +16968,13 @@ class MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBri MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableDoorLockClusterDoorLockUserTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16838,13 +16984,12 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::WindowCovering::EndProductType value); }; @@ -16856,11 +17001,13 @@ class MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16870,14 +17017,12 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16890,11 +17035,13 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16903,12 +17050,11 @@ class MTRNullableWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptio class MTRWindowCoveringClusterTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::WindowCovering::Type value); }; @@ -16919,11 +17065,13 @@ class MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge : public M MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action, true), + MTRWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16933,13 +17081,12 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -16952,11 +17099,13 @@ class MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge MTRNullableWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableWindowCoveringClusterTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -16966,15 +17115,13 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridg : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value); }; @@ -16986,11 +17133,13 @@ class MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubsc MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, handler, action, true), + MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17001,17 +17150,15 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb { public: MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -17025,11 +17172,13 @@ class MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallb MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17039,15 +17188,13 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBri : public MTRCallbackBridge { public: - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value); }; @@ -17059,11 +17206,13 @@ class MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSub MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, handler, action, true), + MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17074,17 +17223,15 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal { public: MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -17098,11 +17245,13 @@ class MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCal MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17112,13 +17261,12 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::SetpointAdjustMode value); }; @@ -17130,11 +17278,13 @@ class MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge MTRThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17144,14 +17294,12 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17164,11 +17312,13 @@ class MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptio MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterSetpointAdjustModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17178,14 +17328,12 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatControlSequence value); }; @@ -17197,11 +17345,13 @@ class MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscription MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17211,15 +17361,13 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBrid : public MTRCallbackBridge { public: - MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -17233,11 +17381,13 @@ class MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubs MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterThermostatControlSequenceAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17247,14 +17397,12 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatRunningMode value); }; @@ -17266,11 +17414,13 @@ class MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBrid MTRThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17280,15 +17430,12 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17301,11 +17448,13 @@ class MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscrip MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterThermostatRunningModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17315,13 +17464,12 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Thermostat::ThermostatSystemMode value); }; @@ -17333,11 +17481,13 @@ class MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridg MTRThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action, true), + MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17347,14 +17497,12 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17367,11 +17515,13 @@ class MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscript MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableThermostatClusterThermostatSystemModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17381,13 +17531,12 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeSequenceType value); }; @@ -17399,11 +17548,13 @@ class MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action, true), + MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17413,14 +17564,12 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17433,11 +17582,13 @@ class MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscripti MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterFanModeSequenceTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17447,13 +17598,11 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::FanControl::FanModeType value); }; @@ -17465,11 +17614,13 @@ class MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action, true), + MTRFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFanControlClusterFanModeTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlClusterFanModeTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17479,13 +17630,12 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17498,11 +17648,13 @@ class MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge MTRNullableFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFanControlClusterFanModeTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17512,13 +17664,12 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorLoopAction value); }; @@ -17530,11 +17681,13 @@ class MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge MTRColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17544,14 +17697,12 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17564,11 +17715,13 @@ class MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscription MTRNullableColorControlClusterColorLoopActionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterColorLoopActionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17578,13 +17731,12 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorLoopDirection value); }; @@ -17596,11 +17748,13 @@ class MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridg MTRColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17610,14 +17764,12 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17630,11 +17782,13 @@ class MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscript MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterColorLoopDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17644,13 +17798,11 @@ class MTRColorControlClusterColorModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::ColorMode value); }; @@ -17662,11 +17814,13 @@ class MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge MTRColorControlClusterColorModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterColorModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17676,13 +17830,12 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterColorModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17695,11 +17848,13 @@ class MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge MTRNullableColorControlClusterColorModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterColorModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterColorModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17709,13 +17864,12 @@ class MTRColorControlClusterHueDirectionAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueDirection value); }; @@ -17727,11 +17881,13 @@ class MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge MTRColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17741,14 +17897,12 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17761,11 +17915,13 @@ class MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBri MTRNullableColorControlClusterHueDirectionAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterHueDirectionAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17775,13 +17931,12 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueMoveMode value); }; @@ -17793,11 +17948,13 @@ class MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge MTRColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17807,14 +17964,12 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17827,11 +17982,13 @@ class MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBrid MTRNullableColorControlClusterHueMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterHueMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17841,13 +17998,12 @@ class MTRColorControlClusterHueStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::HueStepMode value); }; @@ -17859,11 +18015,13 @@ class MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge MTRColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17873,14 +18031,12 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17893,11 +18049,13 @@ class MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBrid MTRNullableColorControlClusterHueStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterHueStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17907,13 +18065,12 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::SaturationMoveMode value); }; @@ -17925,11 +18082,13 @@ class MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridg MTRColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17939,14 +18098,12 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -17959,11 +18116,13 @@ class MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscript MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterSaturationMoveModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -17973,13 +18132,12 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ColorControl::SaturationStepMode value); }; @@ -17991,11 +18149,13 @@ class MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridg MTRColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action, true), + MTRColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18005,14 +18165,12 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18025,11 +18183,13 @@ class MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscript MTRNullableColorControlClusterSaturationStepModeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableColorControlClusterSaturationStepModeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18039,14 +18199,12 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::IlluminanceMeasurement::LightSensorType value); }; @@ -18058,11 +18216,13 @@ class MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscripti MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, handler, action, true), + MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18072,15 +18232,14 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBr : public MTRCallbackBridge { public: - MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -18094,11 +18253,13 @@ class MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSu MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18108,13 +18269,12 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Channel::ChannelStatusEnum value); }; @@ -18126,11 +18286,13 @@ class MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge MTRChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelClusterChannelStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelClusterChannelStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18140,14 +18302,12 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18160,11 +18320,13 @@ class MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBri MTRNullableChannelClusterChannelStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableChannelClusterChannelStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18174,13 +18336,12 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::Channel::LineupInfoTypeEnum value); }; @@ -18192,11 +18353,13 @@ class MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge MTRChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18206,14 +18369,12 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18226,11 +18387,13 @@ class MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBr MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableChannelClusterLineupInfoTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18240,15 +18403,12 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::TargetNavigator::TargetNavigatorStatusEnum value); }; @@ -18260,11 +18420,13 @@ class MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscri MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18275,17 +18437,14 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac { public: MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -18299,11 +18458,13 @@ class MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbac MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTargetNavigatorClusterTargetNavigatorStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18313,14 +18474,12 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::MediaPlayback::MediaPlaybackStatusEnum value); }; @@ -18332,11 +18491,13 @@ class MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptio MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18346,15 +18507,13 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBri : public MTRCallbackBridge { public: - MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -18368,11 +18527,13 @@ class MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSub MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableMediaPlaybackClusterMediaPlaybackStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18382,13 +18543,12 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value); }; @@ -18400,11 +18560,13 @@ class MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridg MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, handler, action, true), + MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18414,14 +18576,12 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18434,11 +18594,13 @@ class MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscript MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18448,13 +18610,12 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::MediaInput::InputTypeEnum value); }; @@ -18466,11 +18627,13 @@ class MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge MTRMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputClusterInputTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18480,14 +18643,12 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18500,11 +18661,13 @@ class MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBrid MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableMediaInputClusterInputTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18514,13 +18677,11 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::KeypadInput::CecKeyCode value); }; @@ -18532,11 +18693,13 @@ class MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge MTRKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, handler, action, true), + MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputClusterCecKeyCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18546,13 +18709,12 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18565,11 +18727,13 @@ class MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableKeypadInputClusterCecKeyCodeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18579,14 +18743,12 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::KeypadInput::KeypadInputStatusEnum value); }; @@ -18598,11 +18760,13 @@ class MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBri MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18612,15 +18776,12 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18633,11 +18794,13 @@ class MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscri MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableKeypadInputClusterKeypadInputStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18647,14 +18810,12 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ContentLauncher::ContentLaunchStatusEnum value); }; @@ -18666,11 +18827,13 @@ class MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscript MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18680,15 +18843,14 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackB : public MTRCallbackBridge { public: - MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -18702,11 +18864,13 @@ class MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackS MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableContentLauncherClusterContentLaunchStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18716,13 +18880,12 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ContentLauncher::MetricTypeEnum value); }; @@ -18734,11 +18897,13 @@ class MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge MTRContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18748,14 +18913,12 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18768,11 +18931,13 @@ class MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscripti MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableContentLauncherClusterMetricTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18782,13 +18947,12 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ContentLauncher::ParameterEnum value); }; @@ -18800,11 +18964,13 @@ class MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge MTRContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, handler, action, true), + MTRContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRContentLauncherClusterParameterEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherClusterParameterEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18814,14 +18980,12 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18834,11 +18998,13 @@ class MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptio MTRNullableContentLauncherClusterParameterEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableContentLauncherClusterParameterEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18848,13 +19014,12 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::AudioOutput::OutputTypeEnum value); }; @@ -18866,11 +19031,13 @@ class MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge MTRAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18880,14 +19047,12 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -18900,11 +19065,13 @@ class MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBr MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableAudioOutputClusterOutputTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18915,17 +19082,14 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac { public: MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ApplicationLauncher::ApplicationLauncherStatusEnum value); }; @@ -18937,11 +19101,13 @@ class MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbac MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18952,17 +19118,15 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut { public: MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge( - queue, handler, OnSuccessFn, keepAlive){}; + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge( - queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; static void OnSuccessFn( void * context, @@ -18976,11 +19140,13 @@ class MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttribut MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -18990,14 +19156,12 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value); }; @@ -19009,11 +19173,13 @@ class MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscripti MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -19023,15 +19189,14 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBr : public MTRCallbackBridge { public: - MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, - keepAlive){}; + MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : + MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + OnSuccessFn){}; static void OnSuccessFn(void * context, @@ -19045,11 +19210,13 @@ class MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSu MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -19059,13 +19226,11 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::TestCluster::SimpleEnum value); }; @@ -19077,11 +19242,13 @@ class MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, handler, action, true), + MTRTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTestClusterClusterSimpleEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -19091,13 +19258,12 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -19110,11 +19276,13 @@ class MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, handler, action, true), + MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -19124,13 +19292,12 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, chip::app::Clusters::FaultInjection::FaultType value); }; @@ -19142,11 +19309,13 @@ class MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge MTRFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFaultInjectionClusterFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -19156,14 +19325,12 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - bool keepAlive = false) : - MTRCallbackBridge(queue, handler, OnSuccessFn, keepAlive){}; + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, bool keepAlive = false) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value); @@ -19176,11 +19343,13 @@ class MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBrid MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, handler, action, true), + MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} static void OnSubscriptionEstablished(void * context); + using MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableFaultInjectionClusterFaultTypeAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler;