Skip to content

Commit

Permalink
Add availability annotations to new XPC protocols. (project-chip#35107)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Aug 21, 2024
1 parent 17cb1d9 commit ec029c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,10 +14,12 @@
* limitations under the License.
*/

#import <Matter/MTRDefines.h>
#import <Matter/MTRDevice.h> // for MTRDeviceState

NS_ASSUME_NONNULL_BEGIN

MTR_NEWLY_AVAILABLE
@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 @@ -28,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
- (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID;
@end

MTR_NEWLY_AVAILABLE
@protocol MTRXPCClientProtocol_MTRDeviceController <NSObject>
// Not Supported via XPC
//- (oneway void)controller:(NSUUID *)controller statusUpdate:(MTRCommissioningStatus)status;
Expand All @@ -36,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
//- (oneway void)controller:(NSUUID *)controller readCommissioningInfo:(MTRProductIdentity *)info;
@end

MTR_NEWLY_AVAILABLE
@protocol MTRXPCClientProtocol <NSObject, MTRXPCClientProtocol_MTRDevice, MTRXPCClientProtocol_MTRDeviceController>
@end

Expand Down
8 changes: 6 additions & 2 deletions src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,8 +14,11 @@
* limitations under the License.
*/

#import <Matter/MTRDefines.h>

NS_ASSUME_NONNULL_BEGIN

MTR_NEWLY_AVAILABLE
@protocol MTRXPCServerProtocol_MTRDevice <NSObject>

- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID getStateWithReply:(void (^)(MTRDeviceState state))reply;
Expand Down Expand Up @@ -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 <NSObject>

- (oneway void)deviceController:(NSUUID *)controller getIsRunningWithReply:(void (^)(BOOL response))reply;
Expand All @@ -69,6 +72,7 @@ NS_ASSUME_NONNULL_BEGIN

@end

MTR_NEWLY_AVAILABLE
@protocol MTRXPCServerProtocol <NSObject, MTRXPCServerProtocol_MTRDevice, MTRXPCServerProtocol_MTRDeviceController>
- (oneway void)deviceController:(NSUUID *)controller checkInWithContext:(NSDictionary *)context;
@end
Expand Down

0 comments on commit ec029c1

Please sign in to comment.