You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove some more unused bits in MTRDeviceController.
Controller's downloadLogFromNodeWithID is only used from MTRBaseDevice, which is
not expected to be used with a non-concrete controller. Unfortunately, nothing
actually prevents an MTRBaseDevice beign created against a non-concrete
controller, so we can't just move this API to MTRDeviceController_Concrete.
With the implementation of downloadLogFromNodeWithID removed, _factory is unused
and can be removed.
Also, with this implementation removed the factory's downloadLogFromNodeWithID
can take MTRDeviceController_Concrete, as can the diagnostic log downloader.
Similarly, getSessionFromNode is only used from MTRBaseDevice and
MTRCallbackBridgeBase's ActionWithNodeID. And ActionWithNodeID is only used
from DispatchAction, which is only called from MTRBaseClusters and
MTRBaseDevice, none of which is expected to work with a non-concrete
controller. So this implementation can also be removed.
At that point directlyGetSessionForNode is only used from MTRDevice_Concrete,
so we can just move it to MTRDeviceController_Concrete.
getSessionForCommissioneeDevice is only used from ActionWithPASEDevice, which is
only used from DispatchAction, like getSessionFromNode. So this implementation
can also be removed.
At this point asyncDispatchToMatterQueue is only used from:
* MTRBaseDevice
* MTRClusterStateCacheContainer, where it's used on a controller coming from
MTRBaseDevice.
* MTRDevice_Concrete, where it's being used on a concrete controller.
* MTRDiagnosticLogsDownloader, where it's being used on a concrete controller.
* MTRServerAttribute/MTRServerCluster/MTRServerEndpoint, which are not usable
with non-concrete controllers as things stand.
* MTROTAProviderDelegateBridge, where its being used on a concrete controller.
So the MTRDeviceController implementation of asyncDispatchToMatterQueue can also
be removed.
0 commit comments