Updating zap
diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm
index d1621103..4118b10 100644
--- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm
@@ -1453,6 +1453,39 @@
}
}
+void CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge::OnSuccessFn(
+ void * context, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType & value)
+{
+ CHIPApplicationLauncherClusterApplicationEP * _Nonnull objCValue;
+ objCValue = [CHIPApplicationLauncherClusterApplicationEP new];
+ objCValue.application = [CHIPApplicationLauncherClusterApplication new];
+ objCValue.application.catalogVendorId = [NSNumber numberWithUnsignedShort:value.application.catalogVendorId];
+ objCValue.application.applicationId = [[NSString alloc] initWithBytes:value.application.applicationId.data()
+ length:value.application.applicationId.size()
+ encoding:NSUTF8StringEncoding];
+ objCValue.endpoint = [[NSString alloc] initWithBytes:value.endpoint.data()
+ length:value.endpoint.size()
+ encoding:NSUTF8StringEncoding];
+ DispatchSuccess(context, objCValue);
+};
+
+void CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(
+ void * context)
+{
+ auto * self = static_cast<CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge *>(context);
+ if (!self->mQueue) {
+ return;
+ }
+
+ if (self->mEstablishedHandler != nil) {
+ dispatch_async(self->mQueue, self->mEstablishedHandler);
+ // On failure, mEstablishedHandler will be cleaned up by our destructor,
+ // but we can clean it up earlier on successful subscription
+ // establishment.
+ self->mEstablishedHandler = nil;
+ }
+}
+
void CHIPApplicationLauncherServerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn(
void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value)
{
@@ -2714,6 +2747,73 @@
}
}
+void CHIPChannelChannelLineupStructAttributeCallbackBridge::OnSuccessFn(
+ void * context, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType & value)
+{
+ CHIPChannelClusterLineupInfo * _Nonnull objCValue;
+ objCValue = [CHIPChannelClusterLineupInfo new];
+ objCValue.operatorName = [[NSString alloc] initWithBytes:value.operatorName.data()
+ length:value.operatorName.size()
+ encoding:NSUTF8StringEncoding];
+ objCValue.lineupName = [[NSString alloc] initWithBytes:value.lineupName.data()
+ length:value.lineupName.size()
+ encoding:NSUTF8StringEncoding];
+ objCValue.postalCode = [[NSString alloc] initWithBytes:value.postalCode.data()
+ length:value.postalCode.size()
+ encoding:NSUTF8StringEncoding];
+ objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.lineupInfoType)];
+ DispatchSuccess(context, objCValue);
+};
+
+void CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+{
+ auto * self = static_cast<CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge *>(context);
+ if (!self->mQueue) {
+ return;
+ }
+
+ if (self->mEstablishedHandler != nil) {
+ dispatch_async(self->mQueue, self->mEstablishedHandler);
+ // On failure, mEstablishedHandler will be cleaned up by our destructor,
+ // but we can clean it up earlier on successful subscription
+ // establishment.
+ self->mEstablishedHandler = nil;
+ }
+}
+
+void CHIPChannelCurrentChannelStructAttributeCallbackBridge::OnSuccessFn(
+ void * context, const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value)
+{
+ CHIPChannelClusterChannelInfo * _Nonnull objCValue;
+ objCValue = [CHIPChannelClusterChannelInfo new];
+ objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.majorNumber];
+ objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.minorNumber];
+ objCValue.name = [[NSString alloc] initWithBytes:value.name.data() length:value.name.size() encoding:NSUTF8StringEncoding];
+ objCValue.callSign = [[NSString alloc] initWithBytes:value.callSign.data()
+ length:value.callSign.size()
+ encoding:NSUTF8StringEncoding];
+ objCValue.affiliateCallSign = [[NSString alloc] initWithBytes:value.affiliateCallSign.data()
+ length:value.affiliateCallSign.size()
+ encoding:NSUTF8StringEncoding];
+ DispatchSuccess(context, objCValue);
+};
+
+void CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+{
+ auto * self = static_cast<CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge *>(context);
+ if (!self->mQueue) {
+ return;
+ }
+
+ if (self->mEstablishedHandler != nil) {
+ dispatch_async(self->mQueue, self->mEstablishedHandler);
+ // On failure, mEstablishedHandler will be cleaned up by our destructor,
+ // but we can clean it up earlier on successful subscription
+ // establishment.
+ self->mEstablishedHandler = nil;
+ }
+}
+
void CHIPChannelServerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn(
void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value)
{
@@ -5781,6 +5881,32 @@
}
}
+void CHIPMediaPlaybackPositionStructAttributeCallbackBridge::OnSuccessFn(
+ void * context, const chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::DecodableType & value)
+{
+ CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull objCValue;
+ objCValue = [CHIPMediaPlaybackClusterPlaybackPosition new];
+ objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.updatedAt];
+ objCValue.position = [NSNumber numberWithUnsignedLongLong:value.position];
+ DispatchSuccess(context, objCValue);
+};
+
+void CHIPMediaPlaybackPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context)
+{
+ auto * self = static_cast<CHIPMediaPlaybackPositionStructAttributeCallbackSubscriptionBridge *>(context);
+ if (!self->mQueue) {
+ return;
+ }
+
+ if (self->mEstablishedHandler != nil) {
+ dispatch_async(self->mQueue, self->mEstablishedHandler);
+ // On failure, mEstablishedHandler will be cleaned up by our destructor,
+ // but we can clean it up earlier on successful subscription
+ // establishment.
+ self->mEstablishedHandler = nil;
+ }
+}
+
void CHIPMediaPlaybackServerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn(
void * context, const chip::app::DataModel::DecodableList<chip::CommandId> & value)
{
diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h
index e880567..d3e4eb4 100644
--- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h
@@ -545,8 +545,16 @@
typedef void (*ApplicationBasicApplicationAppStructAttributeCallback)(
void *, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType &);
+typedef void (*ApplicationLauncherApplicationLauncherAppStructAttributeCallback)(
+ void *, const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType &);
+typedef void (*ChannelChannelLineupStructAttributeCallback)(
+ void *, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType &);
+typedef void (*ChannelCurrentChannelStructAttributeCallback)(
+ void *, const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType &);
typedef void (*GeneralCommissioningBasicCommissioningInfoStructAttributeCallback)(
void *, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType &);
+typedef void (*MediaPlaybackPositionStructAttributeCallback)(
+ void *, const chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::DecodableType &);
typedef void (*TestClusterStructAttrStructAttributeCallback)(
void *, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType &);
typedef void (*TestClusterNullableStructStructAttributeCallback)(
@@ -1770,6 +1778,36 @@
SubscriptionEstablishedHandler mEstablishedHandler;
};
+class CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge
+ : public CHIPCallbackBridge<ApplicationLauncherApplicationLauncherAppStructAttributeCallback>
+{
+public:
+ CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler,
+ CHIPActionBlock action, bool keepAlive = false) :
+ CHIPCallbackBridge<ApplicationLauncherApplicationLauncherAppStructAttributeCallback>(queue, handler, action, OnSuccessFn,
+ keepAlive){};
+
+ static void OnSuccessFn(void * context,
+ const chip::app::Clusters::ApplicationLauncher::Structs::ApplicationEP::DecodableType & value);
+};
+
+class CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge
+ : public CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge
+{
+public:
+ CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge(
+ dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action,
+ SubscriptionEstablishedHandler establishedHandler) :
+ CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge(queue, handler, action, true),
+ mEstablishedHandler(establishedHandler)
+ {}
+
+ static void OnSubscriptionEstablished(void * context);
+
+private:
+ SubscriptionEstablishedHandler mEstablishedHandler;
+};
+
class CHIPApplicationLauncherServerGeneratedCommandListListAttributeCallbackBridge
: public CHIPCallbackBridge<ApplicationLauncherServerGeneratedCommandListListAttributeCallback>
{
@@ -2658,6 +2696,61 @@
SubscriptionEstablishedHandler mEstablishedHandler;
};
+class CHIPChannelChannelLineupStructAttributeCallbackBridge : public CHIPCallbackBridge<ChannelChannelLineupStructAttributeCallback>
+{
+public:
+ CHIPChannelChannelLineupStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action,
+ bool keepAlive = false) :
+ CHIPCallbackBridge<ChannelChannelLineupStructAttributeCallback>(queue, handler, action, OnSuccessFn, keepAlive){};
+
+ static void OnSuccessFn(void * context, const chip::app::Clusters::Channel::Structs::LineupInfo::DecodableType & value);
+};
+
+class CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge
+ : public CHIPChannelChannelLineupStructAttributeCallbackBridge
+{
+public:
+ CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+ CHIPActionBlock action,
+ SubscriptionEstablishedHandler establishedHandler) :
+ CHIPChannelChannelLineupStructAttributeCallbackBridge(queue, handler, action, true),
+ mEstablishedHandler(establishedHandler)
+ {}
+
+ static void OnSubscriptionEstablished(void * context);
+
+private:
+ SubscriptionEstablishedHandler mEstablishedHandler;
+};
+
+class CHIPChannelCurrentChannelStructAttributeCallbackBridge
+ : public CHIPCallbackBridge<ChannelCurrentChannelStructAttributeCallback>
+{
+public:
+ CHIPChannelCurrentChannelStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action,
+ bool keepAlive = false) :
+ CHIPCallbackBridge<ChannelCurrentChannelStructAttributeCallback>(queue, handler, action, OnSuccessFn, keepAlive){};
+
+ static void OnSuccessFn(void * context, const chip::app::Clusters::Channel::Structs::ChannelInfo::DecodableType & value);
+};
+
+class CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge
+ : public CHIPChannelCurrentChannelStructAttributeCallbackBridge
+{
+public:
+ CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+ CHIPActionBlock action,
+ SubscriptionEstablishedHandler establishedHandler) :
+ CHIPChannelCurrentChannelStructAttributeCallbackBridge(queue, handler, action, true),
+ mEstablishedHandler(establishedHandler)
+ {}
+
+ static void OnSubscriptionEstablished(void * context);
+
+private:
+ SubscriptionEstablishedHandler mEstablishedHandler;
+};
+
class CHIPChannelServerGeneratedCommandListListAttributeCallbackBridge
: public CHIPCallbackBridge<ChannelServerGeneratedCommandListListAttributeCallback>
{
@@ -4868,6 +4961,35 @@
SubscriptionEstablishedHandler mEstablishedHandler;
};
+class CHIPMediaPlaybackPositionStructAttributeCallbackBridge
+ : public CHIPCallbackBridge<MediaPlaybackPositionStructAttributeCallback>
+{
+public:
+ CHIPMediaPlaybackPositionStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action,
+ bool keepAlive = false) :
+ CHIPCallbackBridge<MediaPlaybackPositionStructAttributeCallback>(queue, handler, action, OnSuccessFn, keepAlive){};
+
+ static void OnSuccessFn(void * context,
+ const chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::DecodableType & value);
+};
+
+class CHIPMediaPlaybackPositionStructAttributeCallbackSubscriptionBridge
+ : public CHIPMediaPlaybackPositionStructAttributeCallbackBridge
+{
+public:
+ CHIPMediaPlaybackPositionStructAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler,
+ CHIPActionBlock action,
+ SubscriptionEstablishedHandler establishedHandler) :
+ CHIPMediaPlaybackPositionStructAttributeCallbackBridge(queue, handler, action, true),
+ mEstablishedHandler(establishedHandler)
+ {}
+
+ static void OnSubscriptionEstablished(void * context);
+
+private:
+ SubscriptionEstablishedHandler mEstablishedHandler;
+};
+
class CHIPMediaPlaybackServerGeneratedCommandListListAttributeCallbackBridge
: public CHIPCallbackBridge<MediaPlaybackServerGeneratedCommandListListAttributeCallback>
{
diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h
index ec04507..008ab30 100644
--- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h
@@ -339,6 +339,17 @@
reportHandler:(void (^)(NSArray * _Nullable value,
NSError * _Nullable error))reportHandler;
+- (void)readAttributeApplicationLauncherAppWithCompletionHandler:
+ (void (^)(CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler;
+- (void)writeAttributeApplicationLauncherAppWithValue:(CHIPApplicationLauncherClusterApplicationEP * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler;
+- (void)
+ subscribeAttributeApplicationLauncherAppWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPApplicationLauncherClusterApplicationEP * _Nullable value,
+ NSError * _Nullable error))reportHandler;
+
- (void)readAttributeServerGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value,
NSError * _Nullable error))completionHandler;
- (void)subscribeAttributeServerGeneratedCommandListWithMinInterval:(uint16_t)minInterval
@@ -1128,6 +1139,26 @@
subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler;
+- (void)readAttributeChannelLineupWithCompletionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value,
+ NSError * _Nullable error))completionHandler;
+- (void)writeAttributeChannelLineupWithValue:(CHIPChannelClusterLineupInfo * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler;
+- (void)subscribeAttributeChannelLineupWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value,
+ NSError * _Nullable error))reportHandler;
+
+- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value,
+ NSError * _Nullable error))completionHandler;
+- (void)writeAttributeCurrentChannelWithValue:(CHIPChannelClusterChannelInfo * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler;
+- (void)subscribeAttributeCurrentChannelWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value,
+ NSError * _Nullable error))reportHandler;
+
- (void)readAttributeServerGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value,
NSError * _Nullable error))completionHandler;
- (void)subscribeAttributeServerGeneratedCommandListWithMinInterval:(uint16_t)minInterval
@@ -3394,6 +3425,16 @@
subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler;
+- (void)readAttributePositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value,
+ NSError * _Nullable error))completionHandler;
+- (void)writeAttributePositionWithValue:(CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler;
+- (void)subscribeAttributePositionWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value,
+ NSError * _Nullable error))reportHandler;
+
- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value,
NSError * _Nullable error))completionHandler;
- (void)subscribeAttributePlaybackSpeedWithMinInterval:(uint16_t)minInterval
diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm
index 679e946..5a94e91 100644
--- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm
@@ -1308,6 +1308,59 @@
subscriptionEstablishedHandler);
}
+- (void)readAttributeApplicationLauncherAppWithCompletionHandler:
+ (void (^)(CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler
+{
+ new CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackBridge(
+ self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = ApplicationLauncher::Attributes::ApplicationLauncherApp::TypeInfo;
+ auto successFn = Callback<ApplicationLauncherApplicationLauncherAppStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.ReadAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)writeAttributeApplicationLauncherAppWithValue:(CHIPApplicationLauncherClusterApplicationEP * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler
+{
+ new CHIPDefaultSuccessCallbackBridge(
+ self.callbackQueue,
+ ^(id _Nullable ignored, NSError * _Nullable error) {
+ completionHandler(error);
+ },
+ ^(Cancelable * success, Cancelable * failure) {
+ ListFreer listFreer;
+ using TypeInfo = ApplicationLauncher::Attributes::ApplicationLauncherApp::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue;
+ cppValue.application.applicationId = [self asCharSpan:value.application.applicationId];
+ cppValue.endpoint = [self asCharSpan:value.endpoint];
+ auto successFn = Callback<CHIPDefaultSuccessCallbackType>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.WriteAttribute<TypeInfo>(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)
+ subscribeAttributeApplicationLauncherAppWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPApplicationLauncherClusterApplicationEP * _Nullable value,
+ NSError * _Nullable error))reportHandler
+{
+ new CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge(
+ self.callbackQueue, reportHandler,
+ ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = ApplicationLauncher::Attributes::ApplicationLauncherApp::TypeInfo;
+ auto successFn = Callback<ApplicationLauncherApplicationLauncherAppStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.SubscribeAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall,
+ minInterval, maxInterval,
+ CHIPApplicationLauncherApplicationLauncherAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished);
+ },
+ subscriptionEstablishedHandler);
+}
+
- (void)readAttributeServerGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value,
NSError * _Nullable error))completionHandler
{
@@ -4406,6 +4459,114 @@
subscriptionEstablishedHandler);
}
+- (void)readAttributeChannelLineupWithCompletionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value,
+ NSError * _Nullable error))completionHandler
+{
+ new CHIPChannelChannelLineupStructAttributeCallbackBridge(
+ self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = Channel::Attributes::ChannelLineup::TypeInfo;
+ auto successFn = Callback<ChannelChannelLineupStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.ReadAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)writeAttributeChannelLineupWithValue:(CHIPChannelClusterLineupInfo * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler
+{
+ new CHIPDefaultSuccessCallbackBridge(
+ self.callbackQueue,
+ ^(id _Nullable ignored, NSError * _Nullable error) {
+ completionHandler(error);
+ },
+ ^(Cancelable * success, Cancelable * failure) {
+ ListFreer listFreer;
+ using TypeInfo = Channel::Attributes::ChannelLineup::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue.operatorName = [self asCharSpan:value.operatorName];
+ cppValue.lineupName = [self asCharSpan:value.lineupName];
+ cppValue.postalCode = [self asCharSpan:value.postalCode];
+ cppValue.lineupInfoType
+ = static_cast<std::remove_reference_t<decltype(cppValue.lineupInfoType)>>(value.lineupInfoType.unsignedCharValue);
+ auto successFn = Callback<CHIPDefaultSuccessCallbackType>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.WriteAttribute<TypeInfo>(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)subscribeAttributeChannelLineupWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value,
+ NSError * _Nullable error))reportHandler
+{
+ new CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge(
+ self.callbackQueue, reportHandler,
+ ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = Channel::Attributes::ChannelLineup::TypeInfo;
+ auto successFn = Callback<ChannelChannelLineupStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.SubscribeAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall,
+ minInterval, maxInterval,
+ CHIPChannelChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished);
+ },
+ subscriptionEstablishedHandler);
+}
+
+- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value,
+ NSError * _Nullable error))completionHandler
+{
+ new CHIPChannelCurrentChannelStructAttributeCallbackBridge(
+ self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo;
+ auto successFn = Callback<ChannelCurrentChannelStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.ReadAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)writeAttributeCurrentChannelWithValue:(CHIPChannelClusterChannelInfo * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler
+{
+ new CHIPDefaultSuccessCallbackBridge(
+ self.callbackQueue,
+ ^(id _Nullable ignored, NSError * _Nullable error) {
+ completionHandler(error);
+ },
+ ^(Cancelable * success, Cancelable * failure) {
+ ListFreer listFreer;
+ using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue.majorNumber = value.majorNumber.unsignedShortValue;
+ cppValue.minorNumber = value.minorNumber.unsignedShortValue;
+ cppValue.name = [self asCharSpan:value.name];
+ cppValue.callSign = [self asCharSpan:value.callSign];
+ cppValue.affiliateCallSign = [self asCharSpan:value.affiliateCallSign];
+ auto successFn = Callback<CHIPDefaultSuccessCallbackType>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.WriteAttribute<TypeInfo>(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)subscribeAttributeCurrentChannelWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value,
+ NSError * _Nullable error))reportHandler
+{
+ new CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge(
+ self.callbackQueue, reportHandler,
+ ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo;
+ auto successFn = Callback<ChannelCurrentChannelStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.SubscribeAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall,
+ minInterval, maxInterval,
+ CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished);
+ },
+ subscriptionEstablishedHandler);
+}
+
- (void)readAttributeServerGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value,
NSError * _Nullable error))completionHandler
{
@@ -13922,6 +14083,57 @@
subscriptionEstablishedHandler);
}
+- (void)readAttributePositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value,
+ NSError * _Nullable error))completionHandler
+{
+ new CHIPMediaPlaybackPositionStructAttributeCallbackBridge(
+ self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo;
+ auto successFn = Callback<MediaPlaybackPositionStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.ReadAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)writeAttributePositionWithValue:(CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull)value
+ completionHandler:(StatusCompletion)completionHandler
+{
+ new CHIPDefaultSuccessCallbackBridge(
+ self.callbackQueue,
+ ^(id _Nullable ignored, NSError * _Nullable error) {
+ completionHandler(error);
+ },
+ ^(Cancelable * success, Cancelable * failure) {
+ ListFreer listFreer;
+ using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo;
+ TypeInfo::Type cppValue;
+ cppValue.updatedAt = value.updatedAt.unsignedLongLongValue;
+ cppValue.position = value.position.unsignedLongLongValue;
+ auto successFn = Callback<CHIPDefaultSuccessCallbackType>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.WriteAttribute<TypeInfo>(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall);
+ });
+}
+
+- (void)subscribeAttributePositionWithMinInterval:(uint16_t)minInterval
+ maxInterval:(uint16_t)maxInterval
+ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler
+ reportHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value,
+ NSError * _Nullable error))reportHandler
+{
+ new CHIPMediaPlaybackPositionStructAttributeCallbackSubscriptionBridge(
+ self.callbackQueue, reportHandler,
+ ^(Cancelable * success, Cancelable * failure) {
+ using TypeInfo = MediaPlayback::Attributes::Position::TypeInfo;
+ auto successFn = Callback<MediaPlaybackPositionStructAttributeCallback>::FromCancelable(success);
+ auto failureFn = Callback<CHIPDefaultFailureCallbackType>::FromCancelable(failure);
+ return self.cppCluster.SubscribeAttribute<TypeInfo>(successFn->mContext, successFn->mCall, failureFn->mCall,
+ minInterval, maxInterval,
+ CHIPMediaPlaybackPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished);
+ },
+ subscriptionEstablishedHandler);
+}
+
- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(
NSNumber * _Nullable value, NSError * _Nullable error))completionHandler
{
diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m
index 55c2390..71116af 100644
--- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m
+++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m
@@ -44170,6 +44170,58 @@
[self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
+- (void)testSendClusterApplicationLauncherReadAttributeApplicationLauncherAppWithCompletionHandler
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation =
+ [self expectationWithDescription:@"ApplicationLauncherReadAttributeApplicationLauncherAppWithCompletionHandler"];
+
+ [cluster readAttributeApplicationLauncherAppWithCompletionHandler:^(
+ CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) {
+ NSLog(@"ApplicationLauncher ApplicationLauncherApp Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
+
+- (void)testSendClusterApplicationLauncherWriteAttributeApplicationLauncherAppWithValue
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation =
+ [self expectationWithDescription:@"ApplicationLauncherWriteAttributeApplicationLauncherAppWithValue"];
+
+ CHIPApplicationLauncherClusterApplicationEP * _Nonnull value = [[CHIPApplicationLauncherClusterApplicationEP alloc] init];
+ [cluster writeAttributeApplicationLauncherAppWithValue:value
+ completionHandler:^(NSError * _Nullable err) {
+ NSLog(@"ApplicationLauncher ApplicationLauncherApp Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
- (void)testSendClusterApplicationLauncherReadAttributeServerGeneratedCommandListWithCompletionHandler
{
dispatch_queue_t queue = dispatch_get_main_queue();
@@ -45740,6 +45792,106 @@
[self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
+- (void)testSendClusterChannelReadAttributeChannelLineupWithCompletionHandler
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelReadAttributeChannelLineupWithCompletionHandler"];
+
+ [cluster
+ readAttributeChannelLineupWithCompletionHandler:^(CHIPChannelClusterLineupInfo * _Nullable value, NSError * _Nullable err) {
+ NSLog(@"Channel ChannelLineup Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
+
+- (void)testSendClusterChannelWriteAttributeChannelLineupWithValue
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelWriteAttributeChannelLineupWithValue"];
+
+ CHIPChannelClusterLineupInfo * _Nonnull value = [[CHIPChannelClusterLineupInfo alloc] init];
+ [cluster writeAttributeChannelLineupWithValue:value
+ completionHandler:^(NSError * _Nullable err) {
+ NSLog(@"Channel ChannelLineup Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
+- (void)testSendClusterChannelReadAttributeCurrentChannelWithCompletionHandler
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelReadAttributeCurrentChannelWithCompletionHandler"];
+
+ [cluster readAttributeCurrentChannelWithCompletionHandler:^(
+ CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) {
+ NSLog(@"Channel CurrentChannel Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
+
+- (void)testSendClusterChannelWriteAttributeCurrentChannelWithValue
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPChannel * cluster = [[CHIPChannel alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation = [self expectationWithDescription:@"ChannelWriteAttributeCurrentChannelWithValue"];
+
+ CHIPChannelClusterChannelInfo * _Nonnull value = [[CHIPChannelClusterChannelInfo alloc] init];
+ [cluster writeAttributeCurrentChannelWithValue:value
+ completionHandler:^(NSError * _Nullable err) {
+ NSLog(@"Channel CurrentChannel Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
- (void)testSendClusterChannelReadAttributeServerGeneratedCommandListWithCompletionHandler
{
dispatch_queue_t queue = dispatch_get_main_queue();
@@ -52356,6 +52508,56 @@
[self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
}
+- (void)testSendClusterMediaPlaybackReadAttributePositionWithCompletionHandler
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPMediaPlayback * cluster = [[CHIPMediaPlayback alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation = [self expectationWithDescription:@"MediaPlaybackReadAttributePositionWithCompletionHandler"];
+
+ [cluster readAttributePositionWithCompletionHandler:^(
+ CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable err) {
+ NSLog(@"MediaPlayback Position Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
+
+- (void)testSendClusterMediaPlaybackWriteAttributePositionWithValue
+{
+ dispatch_queue_t queue = dispatch_get_main_queue();
+
+ XCTestExpectation * connectedExpectation =
+ [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"];
+ WaitForCommissionee(connectedExpectation, queue);
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+
+ CHIPDevice * device = GetConnectedDevice();
+ CHIPMediaPlayback * cluster = [[CHIPMediaPlayback alloc] initWithDevice:device endpoint:1 queue:queue];
+ XCTAssertNotNil(cluster);
+
+ XCTestExpectation * expectation = [self expectationWithDescription:@"MediaPlaybackWriteAttributePositionWithValue"];
+
+ CHIPMediaPlaybackClusterPlaybackPosition * _Nonnull value = [[CHIPMediaPlaybackClusterPlaybackPosition alloc] init];
+ [cluster writeAttributePositionWithValue:value
+ completionHandler:^(NSError * _Nullable err) {
+ NSLog(@"MediaPlayback Position Error: %@", err);
+ XCTAssertEqual(err.code, 0);
+ [expectation fulfill];
+ }];
+
+ [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil];
+}
- (void)testSendClusterMediaPlaybackReadAttributePlaybackSpeedWithCompletionHandler
{
dispatch_queue_t queue = dispatch_get_main_queue();