Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SetupPayload to include if Discriminator is short #23304

Merged
merged 14 commits into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removing deprecation messages in MTR code
  • Loading branch information
cliffamzn committed Nov 10, 2022
commit fcf71a4925dd53711ef0d2bdf4f80e26e3ada167
16 changes: 3 additions & 13 deletions src/darwin/Framework/CHIP/MTRDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS
API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2));

/**
* @deprecated - Use the setupCommissioningSessionWithPayload API to pair devices
*
* Start pairing for a device with the given ID, using the provided setup PIN
* to establish a PASE connection.
*
Expand All @@ -89,11 +87,9 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS
- (BOOL)pairDevice:(uint64_t)deviceID
discriminator:(uint16_t)discriminator
setupPINCode:(uint32_t)setupPINCode
error:(NSError * __autoreleasing *)error DEPRECATED_MSG_ATTRIBUTE("Use setupCommissioningSessionWithPayload method.");
error:(NSError * __autoreleasing *)error;

/**
* @deprecated - Use the setupCommissioningSessionWithPayload API to pair devices
*
* Start pairing for a device with the given ID, using the provided IP address
* and port to connect to the device and the provided setup PIN to establish a
* PASE connection.
Expand All @@ -107,11 +103,9 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS
address:(NSString *)address
port:(uint16_t)port
setupPINCode:(uint32_t)setupPINCode
error:(NSError * __autoreleasing *)error DEPRECATED_MSG_ATTRIBUTE("Use setupCommissioningSessionWithPayload method.");
error:(NSError * __autoreleasing *)error;

/**
* @deprecated - Use the setupCommissioningSessionWithPayload API to pair devices
*
* Start pairing for a device with the given ID and onboarding payload (QR code
* or manual setup code). The payload will be used to discover the device and
* establish a PASE connection.
Expand All @@ -121,11 +115,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS
* for this controller. That delegate is expected to call commissionDevice
* after that point if it wants to commission the device.
*/
- (BOOL)pairDevice:(uint64_t)deviceID
onboardingPayload:(NSString *)onboardingPayload
error:(NSError * __autoreleasing *)error
DEPRECATED_MSG_ATTRIBUTE("Use setupCommissioningSessionWithPayload method.");

- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error;
- (BOOL)commissionDevice:(uint64_t)deviceId
commissioningParams:(MTRCommissioningParameters *)commissioningParams
error:(NSError * __autoreleasing *)error;
Expand Down
12 changes: 0 additions & 12 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,10 @@ - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload
return success;
}

// Keep this available until clients have migrated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)pairDevice:(uint64_t)deviceID
discriminator:(uint16_t)discriminator
setupPINCode:(uint32_t)setupPINCode
error:(NSError * __autoreleasing *)error
#pragma clang diagnostic pop
{
VerifyOrReturnValue([self checkIsRunning:error], NO);

Expand All @@ -423,15 +419,11 @@ - (BOOL)pairDevice:(uint64_t)deviceID
return success;
}

// Keep this available until clients have migrated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)pairDevice:(uint64_t)deviceID
address:(NSString *)address
port:(uint16_t)port
setupPINCode:(uint32_t)setupPINCode
error:(NSError * __autoreleasing *)error
#pragma clang diagnostic pop
{
VerifyOrReturnValue([self checkIsRunning:error], NO);

Expand All @@ -453,11 +445,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID
return success;
}

// Keep this available until clients have migrated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error
#pragma clang diagnostic pop
{
VerifyOrReturnValue([self checkIsRunning:error], NO);

Expand Down
12 changes: 0 additions & 12 deletions src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,27 @@ - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload
return NO;
}

// Keep this available until clients have migrated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)pairDevice:(uint64_t)deviceID
discriminator:(uint16_t)discriminator
setupPINCode:(uint32_t)setupPINCode
error:(NSError * __autoreleasing *)error
#pragma clang diagnostic pop
{
MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC");
return NO;
}

// Keep this available until clients have migrated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)pairDevice:(uint64_t)deviceID
address:(NSString *)address
port:(uint16_t)port
discriminator:(uint16_t)discriminator
setupPINCode:(uint32_t)setupPINCode
error:(NSError * __autoreleasing *)error
#pragma clang diagnostic pop
{
MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC");
return NO;
}

// Keep this available until clients have migrated
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error
#pragma clang diagnostic pop
{
MTR_LOG_ERROR("MTRDevice doesn't support pairDevice over XPC");
return NO;
Expand Down