Skip to content

Commit

Permalink
Mark ServerEndpoint Darwin objects as Sendable in Swift. (project-chi…
Browse files Browse the repository at this point in the history
…p#32088)

These are allowed to be accessed concurrently from multiple threads, so are Sendable.
  • Loading branch information
bzbarsky-apple authored and bhmanda-silabs committed Feb 22, 2024
1 parent e34803d commit e53484d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/ServerEndpoint/MTRAccessGrant.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
* An access grant, which can be represented as an entry in the Matter Access
* Control cluster.
*/
NS_SWIFT_SENDABLE
MTR_NEWLY_AVAILABLE
@interface MTRAccessGrant : NSObject <NSCopying>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
* A representation of a "device type revision" in the sense used in the Matter
* specification. This has an identifier and a version number.
*/
NS_SWIFT_SENDABLE
MTR_NEWLY_AVAILABLE
@interface MTRDeviceTypeRevision : NSObject <NSCopying>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
* MTRDeviceController. An attribute has an identifier and a value, and may or
* may not be writable.
*/
NS_SWIFT_SENDABLE
MTR_NEWLY_AVAILABLE
@interface MTRServerAttribute : NSObject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A representation of a server cluster implemented by an MTRDeviceController.
*/
NS_SWIFT_SENDABLE
MTR_NEWLY_AVAILABLE
@interface MTRServerCluster : NSObject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A representation of an endpoint implemented by an MTRDeviceController.
*/
NS_SWIFT_SENDABLE
MTR_NEWLY_AVAILABLE
@interface MTRServerEndpoint : NSObject

Expand Down

0 comments on commit e53484d

Please sign in to comment.