From 20386686ca7c21ffa7fa0e103bb2879c86d6a65b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 7 Aug 2024 11:07:58 -0400 Subject: [PATCH] Mark some immutable types in Matter.framework as NS_SWIFT_SENDABLE. (#34787) --- src/darwin/Framework/CHIP/MTRBaseDevice.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index aa3efc54d578cb..d3a1b0833f11fd 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -164,6 +164,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) { * * nil is used to represent wildcards. */ +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTRAttributeRequestPath : NSObject @property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -182,6 +183,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) * * nil is used to represent wildcards. */ +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) @interface MTREventRequestPath : NSObject @property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @@ -572,6 +574,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * A path indicating a specific cluster on a device (i.e. without any * wildcards). */ +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRClusterPath : NSObject @@ -588,6 +591,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * A path indicating a specific attribute on a device (i.e. without any * wildcards). */ +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRAttributePath : MTRClusterPath @@ -604,6 +608,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * (i.e. without any wildcards). There can be multiple instances of actual * events for a given event path. */ +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTREventPath : MTRClusterPath @@ -618,6 +623,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * A path indicating a specific command on a device (i.e. without any * wildcards). */ +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRCommandPath : MTRClusterPath @@ -628,6 +634,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) commandID:(NSNumber *)commandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @end +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRAttributeReport : NSObject @@ -640,7 +647,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * The attribute is nullable and the value of the attribute is null. * * If value is not nil, the actual type of value will depend on the - * schema-defined (typically defiend in the Matter specification) type of the + * schema-defined (typically defined in the Matter specification) type of the * attribute as follows: * * * list: NSArray of whatever type the list entries are. @@ -697,6 +704,7 @@ typedef NS_ENUM(NSUInteger, MTREventPriority) { MTREventPriorityCritical = 2 } MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTREventReport : NSObject