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

[1.0] Update Darwin API for 1.0 launch #22420

Closed
woody-apple opened this issue Sep 6, 2022 · 3 comments
Closed

[1.0] Update Darwin API for 1.0 launch #22420

woody-apple opened this issue Sep 6, 2022 · 3 comments
Assignees

Comments

@woody-apple
Copy link
Contributor

Reproduction steps

No reproduction steps, just API updates.

Bug prevalence

API Updates

GitHub hash of the SDK that was being used

e535710

Platform

darwin

Platform Version(s)

No response

Type

Platform Issue

Anything else?

No response

@andy31415
Copy link
Contributor

andy31415 commented Sep 6, 2022

@woody-apple could you describe what 'API Updates' actually means?
This bug seems very vague. I guess that may be by desgin as it was written and assigned exclusively to Apple engineers, however some form of description would still be nice.

@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Sep 6, 2022

could you describe what 'API Updates' actually means?

We had some internal API reviews of Matter.framework to align it with some API best practices. This issue is about turning the results of those reviews into code changes. This includes naming changes, some type changes, documentation updates, etc, etc.

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 9, 2022
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 10, 2022
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 12, 2022
Switches to typedefs for all the callbacks and using NSNumber for numbers,
except in MTRDeviceController (and the XPC version), which will need some more
complicated changes.

Fixes project-chip#18020

Addresses part of project-chip#22420
andy31415 pushed a commit that referenced this issue Sep 12, 2022
…#22551)

* Remove un-named callbacks and raw integers from Darwin framework API.

Switches to typedefs for all the callbacks and using NSNumber for numbers,
except in MTRDeviceController (and the XPC version), which will need some more
complicated changes.

Fixes #18020

Addresses part of #22420

* Address review comment.
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 14, 2022
* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes project-chip#22532

Addresses part of project-chip#22420
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 14, 2022
* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes project-chip#22532

Addresses part of project-chip#22420
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 14, 2022
* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes project-chip#22532

Addresses part of project-chip#22420
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 14, 2022
* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes project-chip#22532

Addresses part of project-chip#22420
jtung-apple pushed a commit that referenced this issue Sep 14, 2022
* Address API review issues in MTRDeviceController.

* Make MTRBaseDevice creation synchronous.  This requires updates to
  MTRBaseDeviceOverXPC to do the possible async getting of the controller id it
  needs during its async operations, not when getting the device object.
* Rename "pairDevice" to "setupCommissioningSessionWithPayload", fix its
  signature, improve documentation.
* Rename "commissionDevice" to "commissionNodeWithID".
* Rename "stopDevicePairing" to "cancelCommissioningForNodeID" and document.
* Rename "getDeviceBeingCommissioned" to "getDeviceBeingCommissionedWithNodeID".
* Various documentation improvements.
* Add a way to generate a QR code from an MTRSetupPayload to allow correct
  recovery of long discriminators in setupCommissioningSessionWithPayload.
* Fix signature of computePaseVerifier.
* Fix a leak when we failed to start a controller because it wanted a fabric
  that does not exist, or wanted a new fabric and a matching one existed.  This
  used to not show up in LSan before, maybe because we did not have an
  autoreleasepool in place.

Fixes #22533

Addresses part of #22420

* Address review comments.
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 15, 2022
* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes project-chip#22532

Addresses part of project-chip#22420
@woody-apple
Copy link
Contributor Author

Closing this, as we've got this split up enough

bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Sep 15, 2022
bzbarsky-apple added a commit that referenced this issue Sep 15, 2022
* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes #22532

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

* Remove un-named callbacks and raw integers from Darwin framework API.

Switches to typedefs for all the callbacks and using NSNumber for numbers,
except in MTRDeviceController (and the XPC version), which will need some more
complicated changes.

Fixes project-chip#18020

Addresses part of project-chip#22420

* Address review comment.
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
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
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
* Rename all "completionHandler" selectors/arguments to "completion".
* Rename everything ending with "CompletionHandler" to end with "Completion".
* Make sure we consistently use "queue" for callback queues, not "clientQueue".
* Add MTR prefixes to remaining un-prefixed block typedefs.

Fixes project-chip#22529

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

* Improve documentation
* Actually use our size constants in the error-checks we do.
* Make the properties non-nullable, since we always have them after successful
  init.

Fixes project-chip#22544

Addresses part of project-chip#22420
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
* Rename readAttributeWithEndpointID to readAttributePathWithEndpointID
* Document readAttributePathWithEndpointID
* Rename subscribeAttributeWithEndpointID to subscribeAttributePathWithEndpointID
* Document subscribeAttributePathWithEndpointID
* Switch various things from "strong" to "copy" for paths, reports, etc.
* Remove redundant "nonnull" declarations on properties.
* Create typedefs for the NSData representations of certificates, for readability
* Replace "(nullable X *)" with "(X * _Nullable)" in various places.
* Fix various documentation.
* Rename "failSafeExpiryTimeoutSecs" to "failSafeExpiryTimeout".

Fixes project-chip#22531

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

* Move minInterval and maxInterval into MTRSubscribeParams.

* Make the booleans in MTRSubsribeParams and MTRReadParams just BOOL (inited to
  the default) instead of "NSNumber with nil meaning default".

Fixes project-chip#22536
Fixes project-chip#22534

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

* Rename the protocol (and header).
* Fix some comments.

Fixes project-chip#22542

Addresses part of project-chip#22420
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
* Move the parsing method to MTROTAHeader.
* Rename the file to MTROTAHeader.h
* Add documentation.
* Make the properties that can be missing nullable.
* Make properties copy instead of strong.

Fixes project-chip#22540

Addresses part of project-chip#22420
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
* Rename to MTRDeviceControllerFactory.
* Change the startup params startServer to shouldStartServer.
* Change the startup params init signatures to be more aligned.
* Change isRunning to running.
* Rename startup to startControllerFactory and add NSError outparam.
* Rename shutdown to stopControllerFactory
* Rename startControllerOnExistingFabric to
  createControllerOnExistingFabric and add NSError outparam.
* Rename startControllerOnNewFabric to createControllerOnNewFabric and add
  NSError outparam.
* Fix a leak when we failed to start a controller because it wanted a fabric
  that does not exist, or wanted a new fabric and a matching one existed.  This
  used to not show up in LSan before, maybe because we did not have an
  autoreleasepool in place.

Fixes project-chip#22594

Addresses part of project-chip#22420
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
* Address API review issues in MTRDeviceController.

* Make MTRBaseDevice creation synchronous.  This requires updates to
  MTRBaseDeviceOverXPC to do the possible async getting of the controller id it
  needs during its async operations, not when getting the device object.
* Rename "pairDevice" to "setupCommissioningSessionWithPayload", fix its
  signature, improve documentation.
* Rename "commissionDevice" to "commissionNodeWithID".
* Rename "stopDevicePairing" to "cancelCommissioningForNodeID" and document.
* Rename "getDeviceBeingCommissioned" to "getDeviceBeingCommissionedWithNodeID".
* Various documentation improvements.
* Add a way to generate a QR code from an MTRSetupPayload to allow correct
  recovery of long discriminators in setupCommissioningSessionWithPayload.
* Fix signature of computePaseVerifier.
* Fix a leak when we failed to start a controller because it wanted a fabric
  that does not exist, or wanted a new fabric and a matching one existed.  This
  used to not show up in LSan before, maybe because we did not have an
  autoreleasepool in place.

Fixes project-chip#22533

Addresses part of project-chip#22420

* Address review comments.
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
…#22636)

* Fix function naming to indicate we are reading a path (maybe multiple
  attributes), not just an attribute.
* Fix documentation.
* Rename to MTRClusterStateCacheContainer.

Fixes project-chip#22532

Addresses part of project-chip#22420
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this issue Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants