From ec029c1e37d3d8d0133a4f08d3cbbfd60dfb7a8a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 20 Aug 2024 21:05:40 -0400 Subject: [PATCH] Add availability annotations to new XPC protocols. (#35107) --- .../Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h | 7 +++++-- .../Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h index a571ebc07a9257..3e276eb25f760d 100644 --- a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h +++ b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h @@ -1,6 +1,5 @@ -// /** - * Copyright (c) 2023 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +14,12 @@ * limitations under the License. */ +#import #import // for MTRDeviceState NS_ASSUME_NONNULL_BEGIN +MTR_NEWLY_AVAILABLE @protocol MTRXPCClientProtocol_MTRDevice - (oneway void)device:(NSNumber *)nodeID stateChanged:(MTRDeviceState)state; - (oneway void)device:(NSNumber *)nodeID receivedAttributeReport:(NSArray *> *)attributeReport; @@ -28,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID; @end +MTR_NEWLY_AVAILABLE @protocol MTRXPCClientProtocol_MTRDeviceController // Not Supported via XPC //- (oneway void)controller:(NSUUID *)controller statusUpdate:(MTRCommissioningStatus)status; @@ -36,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN //- (oneway void)controller:(NSUUID *)controller readCommissioningInfo:(MTRProductIdentity *)info; @end +MTR_NEWLY_AVAILABLE @protocol MTRXPCClientProtocol @end diff --git a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h index 5d619453b5fd93..1eebb0396570ac 100644 --- a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h +++ b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h @@ -1,6 +1,5 @@ -// /** - * Copyright (c) 2023 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +14,11 @@ * limitations under the License. */ +#import + NS_ASSUME_NONNULL_BEGIN +MTR_NEWLY_AVAILABLE @protocol MTRXPCServerProtocol_MTRDevice - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID getStateWithReply:(void (^)(MTRDeviceState state))reply; @@ -45,6 +47,7 @@ NS_ASSUME_NONNULL_BEGIN // - (oneway void)downloadLogOfType:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID timeout:(NSTimeInterval)timeout completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; @end +MTR_NEWLY_AVAILABLE @protocol MTRXPCServerProtocol_MTRDeviceController - (oneway void)deviceController:(NSUUID *)controller getIsRunningWithReply:(void (^)(BOOL response))reply; @@ -69,6 +72,7 @@ NS_ASSUME_NONNULL_BEGIN @end +MTR_NEWLY_AVAILABLE @protocol MTRXPCServerProtocol - (oneway void)deviceController:(NSUUID *)controller checkInWithContext:(NSDictionary *)context; @end