Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Darwin availability annotations to account for new release. #36304

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,27 +168,20 @@ typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAUpdateState) {
* SaturationMoveMode and SaturationStepMode.
*/
typedef NS_ENUM(uint8_t, MTRColorControlSaturationMoveMode) {
MTRColorControlSaturationMoveModeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeStop")
MTRColorControlSaturationMoveModeStop MTR_DEPRECATED("Please use MTRColorControlMoveModeStop", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2))
= 0x00,
MTRColorControlSaturationMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeUp")
MTRColorControlSaturationMoveModeUp MTR_DEPRECATED("Please use MTRColorControlMoveModeUp", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2))
= 0x01,
MTRColorControlSaturationMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeDown")
MTRColorControlSaturationMoveModeDown MTR_DEPRECATED("Please use MTRColorControlMoveModeDown", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2))
= 0x03,
} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveMode");
} MTR_DEPRECATED("Please use MTRColorControlMoveMode", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2));

typedef NS_ENUM(uint8_t, MTRColorControlSaturationStepMode) {
MTRColorControlSaturationStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepModeUp")
MTRColorControlSaturationStepModeUp MTR_DEPRECATED("Please use MTRColorControlStepModeUp", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2))
= 0x01,
MTRColorControlSaturationStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepModeDown")
MTRColorControlSaturationStepModeDown MTR_DEPRECATED("Please use MTRColorControlStepModeDown", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2))
= 0x03,
} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepMode");
} MTR_DEPRECATED("Please use MTRColorControlStepMode", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2));

#pragma mark - Clusters that were removed wholesale: OnOffSwitchConfiguration

Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRCertificateInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
/**
* Public key data for this certificate
*/
@property (nullable, readonly, retain) NSData * publicKeyData MTR_NEWLY_AVAILABLE;
@property (nullable, readonly, retain) NSData * publicKeyData MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

@end

Expand Down
6 changes: 3 additions & 3 deletions src/darwin/Framework/CHIP/MTRClusterNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MTR_EXTERN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) NSSt
* or '<Unknown commandID %d>' (if the cluster ID is known but the command ID is not known)
* will be returned.
*/
MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRRequestCommandNameForID(MTRClusterIDType clusterID, MTRCommandIDType commandID);
MTR_EXTERN MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) NSString * MTRRequestCommandNameForID(MTRClusterIDType clusterID, MTRCommandIDType commandID);

/**
* Resolve Matter response (server to client) command IDs into a descriptive string.
Expand All @@ -58,7 +58,7 @@ MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRRequestCommandNameForID(MTRClusterI
* or '<Unknown commandID %d>' (if the cluster ID is known but the command ID is not known)
* will be returned.
*/
MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRResponseCommandNameForID(MTRClusterIDType clusterID, MTRCommandIDType commandID);
MTR_EXTERN MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) NSString * MTRResponseCommandNameForID(MTRClusterIDType clusterID, MTRCommandIDType commandID);

/**
* Resolve Matter event IDs into a descriptive string.
Expand All @@ -67,4 +67,4 @@ MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTRResponseCommandNameForID(MTRCluster
* or '<Unknown eventID %d>' (if the cluster ID is known but the event ID is not known)
* will be returned.
*/
MTR_EXTERN MTR_NEWLY_AVAILABLE NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID);
MTR_EXTERN MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID);
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
* documentation for MTRDeviceResponseHandler. Each one will have an
* MTRAttributePathKey and an MTRDataKey.
*/
- (NSArray<NSDictionary<NSString *, id> *> *)readAttributePaths:(NSArray<MTRAttributeRequestPath *> *)attributePaths MTR_NEWLY_AVAILABLE;
- (NSArray<NSDictionary<NSString *, id> *> *)readAttributePaths:(NSArray<MTRAttributeRequestPath *> *)attributePaths MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

/**
* Invoke a command with a designated command path
Expand Down
10 changes: 5 additions & 5 deletions src/darwin/Framework/CHIP/MTRDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
/**
* If true, the controller has been suspended via `suspend` and not resumed yet.
*/
@property (readonly, nonatomic, getter=isSuspended) BOOL suspended MTR_NEWLY_AVAILABLE;
@property (readonly, nonatomic, getter=isSuspended) BOOL suspended MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

/**
* The ID assigned to this controller at creation time.
Expand Down Expand Up @@ -210,14 +210,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
* @param[in] queue The queue on which the callbacks will be delivered
*/
- (void)addDeviceControllerDelegate:(id<MTRDeviceControllerDelegate>)delegate
queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE;
queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

/**
* Removes a Delegate from the device controller
*
* @param[in] delegate The delegate to be removed
*/
- (void)removeDeviceControllerDelegate:(id<MTRDeviceControllerDelegate>)delegate MTR_NEWLY_AVAILABLE;
- (void)removeDeviceControllerDelegate:(id<MTRDeviceControllerDelegate>)delegate MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

/**
* Start scanning for commissionable devices.
Expand Down Expand Up @@ -289,7 +289,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
*
* Suspending an already-suspended controller has no effect.
*/
- (void)suspend MTR_NEWLY_AVAILABLE;
- (void)suspend MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

/**
* Resume the controller. This has no effect if the controller is not
Expand All @@ -298,7 +298,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
* A resume following any number of suspend calls will resume the controller;
* there does not need to be a resume call to match every suspend call.
*/
- (void)resume MTR_NEWLY_AVAILABLE;
- (void)resume MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

/**
* Shut down the controller. Calls to shutdown after the first one are NO-OPs.
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
* the controller will be in the specified state.
*/
- (void)controller:(MTRDeviceController *)controller
suspendedChangedTo:(BOOL)suspended MTR_NEWLY_AVAILABLE;
suspendedChangedTo:(BOOL)suspended MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
@end

typedef NS_ENUM(NSUInteger, MTRPairingStatus) {
Expand Down
8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6))
/**
* The root certificate we were initialized with.
*/
@property (nonatomic, copy, readonly) MTRCertificateDERBytes rootCertificate MTR_NEWLY_AVAILABLE;
@property (nonatomic, copy, readonly) MTRCertificateDERBytes rootCertificate MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

@end

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@interface MTRXPCDeviceControllerParameters : MTRDeviceControllerAbstractParameters

- (instancetype)init NS_UNAVAILABLE;
Expand All @@ -174,8 +174,8 @@ MTR_NEWLY_AVAILABLE
- (instancetype)initWithXPConnectionBlock:(NSXPCConnection * (^)(void) )xpcConnectionBlock
uniqueIdentifier:(NSUUID *)uniqueIdentifier;

@property (atomic, readonly, retain) NSUUID * uniqueIdentifier MTR_NEWLY_AVAILABLE;
@property (readonly, strong, nonatomic) NSXPCConnection * (^xpcConnectionBlock)(void) MTR_NEWLY_AVAILABLE;
@property (atomic, readonly, retain) NSUUID * uniqueIdentifier MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
@property (readonly, strong, nonatomic) NSXPCConnection * (^xpcConnectionBlock)(void) MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));

@end

Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceType.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

NS_ASSUME_NONNULL_BEGIN

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@interface MTRDeviceType : NSObject

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

NS_ASSUME_NONNULL_BEGIN

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@protocol MTRXPCClientProtocol_MTRDevice <NSObject>
- (oneway void)device:(NSNumber *)nodeID stateChanged:(MTRDeviceState)state;
- (oneway void)device:(NSNumber *)nodeID receivedAttributeReport:(NSArray<NSDictionary<NSString *, id> *> *)attributeReport;
Expand All @@ -30,7 +30,7 @@ MTR_NEWLY_AVAILABLE
- (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)dictionary;
@end

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@protocol MTRXPCClientProtocol_MTRDeviceController <NSObject>
// Not Supported via XPC
//- (oneway void)controller:(NSUUID *)controller statusUpdate:(MTRCommissioningStatus)status;
Expand All @@ -41,7 +41,7 @@ MTR_NEWLY_AVAILABLE
- (oneway void)controller:(NSUUID *)controller controllerConfigurationUpdated:(NSDictionary *)configuration;
@end

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@protocol MTRXPCClientProtocol <NSObject, MTRXPCClientProtocol_MTRDevice, MTRXPCClientProtocol_MTRDeviceController>
@end

Expand Down
12 changes: 6 additions & 6 deletions src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

NS_ASSUME_NONNULL_BEGIN

MTR_EXTERN NSString * const MTRDeviceControllerRegistrationNodeIDsKey MTR_NEWLY_AVAILABLE;
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationNodeIDKey MTR_NEWLY_AVAILABLE;
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationControllerContextKey MTR_NEWLY_AVAILABLE;
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationNodeIDsKey MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationNodeIDKey MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationControllerContextKey MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationControllerNodeIDKey MTR_NEWLY_AVAILABLE;
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationControllerIsRunningKey MTR_NEWLY_AVAILABLE;
MTR_EXTERN NSString * const MTRDeviceControllerRegistrationDeviceInternalStateKey MTR_NEWLY_AVAILABLE;

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@protocol MTRXPCServerProtocol_MTRDevice <NSObject>

- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID getStateWithReply:(void (^)(MTRDeviceState state))reply;
Expand Down Expand Up @@ -53,7 +53,7 @@ MTR_NEWLY_AVAILABLE

@end

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@protocol MTRXPCServerProtocol_MTRDeviceController <NSObject>

@optional
Expand All @@ -76,7 +76,7 @@ MTR_NEWLY_AVAILABLE

@end

MTR_NEWLY_AVAILABLE
MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2))
@protocol MTRXPCServerProtocol <NSObject, MTRXPCServerProtocol_MTRDevice, MTRXPCServerProtocol_MTRDeviceController>
@optional
- (oneway void)deviceController:(NSUUID *)controller checkInWithContext:(NSDictionary *)context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ typedef NS_ENUM(uint32_t, MTRDeviceTypeIDType) {
MTRDeviceTypeIDType{{asUpperCamelCase caption preserveAcronyms=true}}ID {{availability "" deviceType=(asUpperCamelCase caption preserveAcronyms=true)}} = {{asHex code 8}},
{{/if}}
{{/zcl_device_types}}
} MTR_NEWLY_AVAILABLE;
} MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
17 changes: 15 additions & 2 deletions src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9682,8 +9682,12 @@
- Presets
- MatterScheduleConfiguration

- release: "Future"
versions: "future"
- release: "6C44AB2F-2F6B-4B57-B523-5CD89584986F"
versions:
iOS: "18.2"
macOS: "15.2"
watchOS: "11.2"
tvOS: "18.2"
introduced:
enums:
ColorControl:
Expand Down Expand Up @@ -10077,3 +10081,12 @@
- ColorLoop
- XY
- ColorTemperature

- release: "Future"
versions: "future"
provisional:
device types:
- BatteryStorage
- HeatPump
- SolarPower
- WaterHeater
Loading
Loading