Skip to content

Commit

Permalink
Restyled by whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and woody-apple committed Aug 17, 2024
1 parent c04f2bf commit 8e8d4d5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions src/darwin/Framework/CHIP/MTRCluster.mm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ + (BOOL)supportsSecureCoding {
- (nullable instancetype)initWithCoder:(NSCoder *)decoder
{
self = [super init];

if (self == nil) {
return nil;
}
Expand Down Expand Up @@ -135,7 +135,7 @@ + (BOOL)supportsSecureCoding {
- (nullable instancetype)initWithCoder:(NSCoder *)decoder
{
self = [super init];

if (self == nil) {
return nil;
}
Expand Down Expand Up @@ -196,7 +196,7 @@ - (instancetype)initWithMinInterval:(NSNumber *)minInterval maxInterval:(NSNumbe
- (id)copyWithZone:(NSZone * _Nullable)zone
{
auto other = [[MTRSubscribeParams alloc] initWithMinInterval:self.minInterval maxInterval:self.maxInterval];

other.filterByFabric = self.filterByFabric;
other.minEventNumber = self.minEventNumber;
other.assumeUnknownAttributesReportable = self.assumeUnknownAttributesReportable;
Expand All @@ -223,7 +223,7 @@ + (BOOL)supportsSecureCoding {
- (nullable instancetype)initWithCoder:(NSCoder *)decoder
{
self = [super initWithCoder: decoder];

if (self == nil) {
return nil;
}
Expand All @@ -240,11 +240,11 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder
- (void)encodeWithCoder:(NSCoder *)coder
{
[super encodeWithCoder: coder];

[coder encodeBool: self.replaceExistingSubscriptions forKey:sReplaceExistingSubscriptionsCoderKey];
[coder encodeBool: self.reportEventsUrgently forKey:sReportEventsUrgentlyCoderKey];
[coder encodeBool: self.resubscribeAutomatically forKey:sResubscribeAutomaticallyCoderKey];

if ( self.minInterval )
[coder encodeObject:self.minInterval forKey:sMinIntervalKeyCoderKey];
if ( self.maxInterval )
Expand Down
24 changes: 12 additions & 12 deletions src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ - (id)initWithUniqueIdentifier:(NSUUID *)UUID xpConnectionBlock:(NSXPCConnection
MTR_LOG("Setting up XPC Controller for UUID: %@ with connection block: %p", UUID, connectionBlock);
self.xpcConnection = connectionBlock();
self.uniqueIdentifier = UUID;

MTR_LOG("Set up XPC Connection: %@", self.xpcConnection);
if ( self.xpcConnection ) {
self.xpcConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCServerProtocol)];

self.xpcConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCClientProtocol)];
self.xpcConnection.exportedObject = self;

MTR_LOG("Resuming new XPC connection");
[self.xpcConnection resume];
} else {
MTR_LOG_ERROR("Failed to set up XPC Connection");
return nil;
}
}

return self;
}

Expand All @@ -74,14 +74,14 @@ - (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machSe
MTR_LOG("Setting up XPC Controller for UUID: %@ with machServiceName: %s options: %d", UUID, machServiceName, options);
self.xpcConnection = [[NSXPCConnection alloc] initWithMachServiceName:machServiceName options:options];
self.uniqueIdentifier = UUID;

MTR_LOG("Set up XPC Connection: %@", self.xpcConnection);
if ( self.xpcConnection ) {
self.xpcConnection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCServerProtocol)];

self.xpcConnection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCClientProtocol)];
self.xpcConnection.exportedObject = self;

MTR_LOG("%s: resuming new XPC connection");
[self.xpcConnection resume];
} else {
Expand All @@ -90,7 +90,7 @@ - (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machSe
}
}


return self;
}
#endif // MTR_HAVE_MACH_SERVICE_NAME_CONSTRUCTOR
Expand Down Expand Up @@ -137,7 +137,7 @@ - (oneway void)device:(NSNumber *)nodeID stateChanged:(MTRDeviceState)state {
- (oneway void)device:(NSNumber *)nodeID receivedAttributeReport:(NSArray<NSDictionary<NSString *, id> *> *)attributeReport {
MTRDevice_XPC * device = (MTRDevice_XPC *)[self deviceForNodeID: nodeID];
MTR_LOG("Received device: %@ receivedAttributeReport: %@ found device: %@", nodeID, attributeReport, device);

[device device: nodeID receivedAttributeReport: attributeReport];
}
- (oneway void)device:(NSNumber *)nodeID receivedEventReport:(NSArray<NSDictionary<NSString *, id> *> *)eventReport {
Expand Down Expand Up @@ -171,13 +171,13 @@ - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID {
//- (oneway void)controller:(NSUUID *)controller statusUpdate:(MTRCommissioningStatus)status {
// }
//- (oneway void)controller:(NSUUID *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error {
//
//
//}
//- (oneway void)controller:(NSUUID *)controller commissioningComplete:(NSError * _Nullable)error nodeID:(NSNumber * _Nullable)nodeID metrics:(MTRMetrics * _Nullable)metrics {
//
//
//}
//- (oneway void)controller:(NSUUID *)controller readCommissioningInfo:(MTRProductIdentity *)info {
//
//
//}

@end

0 comments on commit 8e8d4d5

Please sign in to comment.