Skip to content

Commit

Permalink
Revert "Updating XPC interfaces to pass along context, and fixing som…
Browse files Browse the repository at this point in the history
…e retries (project-chip#35441)" (project-chip#35457)

This reverts commit f89d5b9.

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and austina-csa committed Sep 20, 2024
1 parent 7d80d09 commit d00d519
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
8 changes: 1 addition & 7 deletions src/darwin/Framework/CHIP/MTRDeviceController+XPC.mm
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@
static NSSet * GetXPCAllowedClasses()
{
static NSSet * const sXPCAllowedClasses = [NSSet setWithArray:@[
[NSString class],
[NSNumber class],
[NSData class],
[NSArray class],
[NSDictionary class],
[NSError class],
[NSDate class],
[NSString class], [NSNumber class], [NSData class], [NSArray class], [NSDictionary class], [NSError class]
]];
return sXPCAllowedClasses;
}
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceController_XPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MTR_TESTABLE
- (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machServiceName options:(NSXPCConnectionOptions)options
#endif

@property(nullable, atomic, retain, readwrite)NSXPCConnection * xpcConnection;
@property(atomic, retain, readwrite)NSXPCConnection * xpcConnection;

@end

Expand Down
6 changes: 1 addition & 5 deletions src/darwin/Framework/CHIP/MTRDevice_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,6 @@ static NSString * const sLastInitialSubscribeLatencyKey = @"lastInitialSubscribe
// Concrete to XPC internal state property dictionary keys
static NSString * const kMTRDeviceInternalPropertyKeyVendorID = @"MTRDeviceInternalStateKeyVendorID";
static NSString * const kMTRDeviceInternalPropertyKeyProductID = @"MTRDeviceInternalStateKeyProductID";
static NSString * const kMTRDeviceInternalPropertyNetworkFeatures = @"MTRDeviceInternalPropertyNetworkFeatures";
static NSString * const kMTRDeviceInternalPropertyDeviceState = @"MTRDeviceInternalPropertyDeviceState";
static NSString * const kMTRDeviceInternalPropertyLastSubscriptionAttemptWait = @"kMTRDeviceInternalPropertyLastSubscriptionAttemptWait";
static NSString * const kMTRDeviceInternalPropertyMostRecentReportTime = @"MTRDeviceInternalPropertyMostRecentReportTime";
static NSString * const kMTRDeviceInternalPropertyLastSubscriptionFailureTime = @"MTRDeviceInternalPropertyLastSubscriptionFailureTime";
// TODO: more internal properties

NS_ASSUME_NONNULL_END
3 changes: 3 additions & 0 deletions src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ MTR_NEWLY_AVAILABLE
- (oneway void)deviceBecameActive:(NSNumber *)nodeID;
- (oneway void)deviceCachePrimed:(NSNumber *)nodeID;
- (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID;

@optional
// temporarily optional to avoid lockstep needs
- (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)dictionary;
@end

Expand Down
3 changes: 3 additions & 0 deletions src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ MTR_NEWLY_AVAILABLE
// - (oneway void)deviceController:(NSUUID *)controller removeServerEndpoint:(MTRServerEndpoint *)endpoint;

- (oneway void)deviceController:(NSUUID *)controller shutdownDeviceController:(NSUUID *)controller;

@optional
// register / unregister temporarily optional to avoid lockstep needs
- (oneway void)deviceController:(NSUUID *)controller registerNodeID:(NSNumber *)nodeID;
- (oneway void)deviceController:(NSUUID *)controller unregisterNodeID:(NSNumber *)nodeID;

Expand Down

0 comments on commit d00d519

Please sign in to comment.