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

[Platform] Fix setup payload parser APIs as part of the Darwin API review #22539

Closed
bzbarsky-apple opened this issue Sep 12, 2022 · 0 comments · Fixed by #22566
Closed

[Platform] Fix setup payload parser APIs as part of the Darwin API review #22539

bzbarsky-apple opened this issue Sep 12, 2022 · 0 comments · Fixed by #22566
Assignees

Comments

@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Sep 12, 2022

Reproduction steps

  1. MTRManualSetupPayloadParser and MTRQRCodeSetupPayloadParser should not be public APIs.
  2. MTROnboardingPayloadParser should not be a public API.
  3. MTRSetupPayload should have a single class method like:
    + (MTRSetupPayload * _Nullable)setupPayloadWithOnboardingPayload:(NSString *)onboardingPayload error:(NSError * __autoreleasing *)error;
    
    and internally it can use those other bits for now as desired, though we should remove some of the complexity here if we can.

May have a bit of overlap with #22531 but the conflicts should be minimal. Otherwise, this looks independent of the other API change bits going on.

Part of #22420

Platform

darwin

Platform Version(s)

No response

Type

Manually tested with SDK

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

No response

@bzbarsky-apple bzbarsky-apple self-assigned this Sep 12, 2022
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 12, 2022
* Rename MTRDiscoveryCapabilitiesNone to MTRDiscoveryCapabilitiesUnknown to
  indicate capabilities unknown (e.g. manual setup code).
* In MTROptionalQRCodeInfo mark integerValue and stringValue as nullable and
  document they are mutually exclusive.
* In MTROptionalQRCodeInfo switch infoType to MTROptionalQRCodeInfoType, not
  NSNumber.
* Change rendezvousInformation to just be a MTRDiscoveryCapabilities value, not
  nullable NSNumber, with MTRDiscoveryCapabilitiesNone meaning unknown. When
  parsing QR code, if the value ends up as 0, reset it to
  MTRDiscoveryCapabilitiesOnNetwork.
* Rename setUpPINCode to setupPasscode.
* Mark serialNumber as nullable.
* Add setupPayloadWithOnboardingPayload class method on MTRSetupPayload.
* Stop exposing the various payload parser APIs from the framework;
  consumers should use setupPayloadWithOnboardingPayload.

Fixes project-chip#22543
Fixes project-chip#22539

Addresses part of project-chip#22420
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 12, 2022
* Rename MTRDiscoveryCapabilitiesNone to MTRDiscoveryCapabilitiesUnknown to
  indicate capabilities unknown (e.g. manual setup code).
* In MTROptionalQRCodeInfo mark integerValue and stringValue as nullable and
  document they are mutually exclusive.
* In MTROptionalQRCodeInfo switch infoType to MTROptionalQRCodeInfoType, not
  NSNumber.
* Change rendezvousInformation to just be a MTRDiscoveryCapabilities value, not
  nullable NSNumber, with MTRDiscoveryCapabilitiesNone meaning unknown. When
  parsing QR code, if the value ends up as 0, reset it to
  MTRDiscoveryCapabilitiesOnNetwork.
* Rename setUpPINCode to setupPasscode.
* Mark serialNumber as nullable.
* Add setupPayloadWithOnboardingPayload class method on MTRSetupPayload.
* Stop exposing the various payload parser APIs from the framework;
  consumers should use setupPayloadWithOnboardingPayload.

Fixes project-chip#22543

Fixes project-chip#22539

Addresses part of project-chip#22420
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 12, 2022
* Rename MTRDiscoveryCapabilitiesNone to MTRDiscoveryCapabilitiesUnknown to
  indicate capabilities unknown (e.g. manual setup code).
* In MTROptionalQRCodeInfo mark integerValue and stringValue as nullable and
  document they are mutually exclusive.
* In MTROptionalQRCodeInfo switch infoType to MTROptionalQRCodeInfoType, not
  NSNumber.
* Change rendezvousInformation to just be a MTRDiscoveryCapabilities value, not
  nullable NSNumber, with MTRDiscoveryCapabilitiesNone meaning unknown. When
  parsing QR code, if the value ends up as 0, reset it to
  MTRDiscoveryCapabilitiesOnNetwork.
* Rename setUpPINCode to setupPasscode.
* Mark serialNumber as nullable.
* Add setupPayloadWithOnboardingPayload class method on MTRSetupPayload.
* Stop exposing the various payload parser APIs from the framework;
  consumers should use setupPayloadWithOnboardingPayload.

Fixes project-chip#22543

Fixes project-chip#22539

Addresses part of project-chip#22420
bzbarsky-apple added a commit that referenced this issue Sep 12, 2022
…#22566)

* Rename MTRDiscoveryCapabilitiesNone to MTRDiscoveryCapabilitiesUnknown to
  indicate capabilities unknown (e.g. manual setup code).
* In MTROptionalQRCodeInfo mark integerValue and stringValue as nullable and
  document they are mutually exclusive.
* In MTROptionalQRCodeInfo switch infoType to MTROptionalQRCodeInfoType, not
  NSNumber.
* Change rendezvousInformation to just be a MTRDiscoveryCapabilities value, not
  nullable NSNumber, with MTRDiscoveryCapabilitiesNone meaning unknown. When
  parsing QR code, if the value ends up as 0, reset it to
  MTRDiscoveryCapabilitiesOnNetwork.
* Rename setUpPINCode to setupPasscode.
* Mark serialNumber as nullable.
* Add setupPayloadWithOnboardingPayload class method on MTRSetupPayload.
* Stop exposing the various payload parser APIs from the framework;
  consumers should use setupPayloadWithOnboardingPayload.

Fixes #22543

Fixes #22539

Addresses part of #22420
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 12, 2022
…project-chip#22566)

* Rename MTRDiscoveryCapabilitiesNone to MTRDiscoveryCapabilitiesUnknown to
  indicate capabilities unknown (e.g. manual setup code).
* In MTROptionalQRCodeInfo mark integerValue and stringValue as nullable and
  document they are mutually exclusive.
* In MTROptionalQRCodeInfo switch infoType to MTROptionalQRCodeInfoType, not
  NSNumber.
* Change rendezvousInformation to just be a MTRDiscoveryCapabilities value, not
  nullable NSNumber, with MTRDiscoveryCapabilitiesNone meaning unknown. When
  parsing QR code, if the value ends up as 0, reset it to
  MTRDiscoveryCapabilitiesOnNetwork.
* Rename setUpPINCode to setupPasscode.
* Mark serialNumber as nullable.
* Add setupPayloadWithOnboardingPayload class method on MTRSetupPayload.
* Stop exposing the various payload parser APIs from the framework;
  consumers should use setupPayloadWithOnboardingPayload.

Fixes project-chip#22543

Fixes project-chip#22539

Addresses part of project-chip#22420
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
…project-chip#22566)

* Rename MTRDiscoveryCapabilitiesNone to MTRDiscoveryCapabilitiesUnknown to
  indicate capabilities unknown (e.g. manual setup code).
* In MTROptionalQRCodeInfo mark integerValue and stringValue as nullable and
  document they are mutually exclusive.
* In MTROptionalQRCodeInfo switch infoType to MTROptionalQRCodeInfoType, not
  NSNumber.
* Change rendezvousInformation to just be a MTRDiscoveryCapabilities value, not
  nullable NSNumber, with MTRDiscoveryCapabilitiesNone meaning unknown. When
  parsing QR code, if the value ends up as 0, reset it to
  MTRDiscoveryCapabilitiesOnNetwork.
* Rename setUpPINCode to setupPasscode.
* Mark serialNumber as nullable.
* Add setupPayloadWithOnboardingPayload class method on MTRSetupPayload.
* Stop exposing the various payload parser APIs from the framework;
  consumers should use setupPayloadWithOnboardingPayload.

Fixes project-chip#22543

Fixes project-chip#22539

Addresses part of project-chip#22420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant