Skip to content

Commit

Permalink
[Darwin] Fix Matter framework delegates to pass the delegating object…
Browse files Browse the repository at this point in the history
… as the first arg to their methods - Followup for the missing delegates that have not been updated in examples/darwin-framework-tool/commands/tests/TestCommandBridge.h (project-chip#22690)
  • Loading branch information
vivien-apple authored Sep 16, 2022
1 parent ee897f1 commit 7862371
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ constexpr const char * kDefaultKey = "default";
@property chip::NodeId deviceId;
@property BOOL active; // Whether to pass on notifications to the commandBridge

- (void)onStatusUpdate:(MTRCommissioningStatus)status;
- (void)onCommissioningSessionEstablishmentDone:(NSError * _Nullable)error;
- (void)onCommissioningComplete:(NSError * _Nullable)error;
- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status;
- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error;
- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithTestCommandBridge:(TestCommandBridge *)commandBridge;
Expand Down Expand Up @@ -529,7 +529,7 @@ class TestCommandBridge : public CHIPCommandBridge,
NS_ASSUME_NONNULL_BEGIN

@implementation TestDeviceControllerDelegate
- (void)onStatusUpdate:(MTRCommissioningStatus)status
- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status
{
if (_active) {
if (status == MTRCommissioningStatusSuccess) {
Expand All @@ -542,7 +542,7 @@ NS_ASSUME_NONNULL_BEGIN
}
}

- (void)onCommissioningSessionEstablishmentDone:(NSError * _Nullable)error
- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error
{
if (_active) {
if (error != nil) {
Expand All @@ -556,7 +556,7 @@ NS_ASSUME_NONNULL_BEGIN
}
}

- (void)onCommissioningComplete:(NSError * _Nullable)error
- (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError * _Nullable)error
{
if (_active) {
_active = NO;
Expand Down

0 comments on commit 7862371

Please sign in to comment.