Skip to content

Commit

Permalink
Mark some immutable types in Matter.framework as NS_SWIFT_SENDABLE. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Aug 29, 2024
1 parent c728ec5 commit 2038668
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/darwin/Framework/CHIP/MTRBaseDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NSCopying>
@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
Expand All @@ -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 <NSCopying>
@property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0));
Expand Down Expand Up @@ -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 <NSCopying, NSSecureCoding>

Expand All @@ -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 <NSSecureCoding>

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 2038668

Please sign in to comment.