-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Refactored mDNS Browse Interface #32866
Refactored mDNS Browse Interface #32866
Conversation
PR #32866: Size comparison from 9080cd3 to 6bb3a19 Increases (46 builds for bl702, bl702l, cc13x4_26x4, cyw30739, efr32, esp32, linux, nrfconnect, nxp, qpg, stm32, telink)
Decreases (43 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, linux, mbed, nrfconnect, psoc6, stm32)
Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
|
e1b9f7f
to
4e7ede7
Compare
4e7ede7
to
a6049d0
Compare
PR #32866: Size comparison from 9b9ed65 to a6049d0 Increases (45 builds for bl702, bl702l, cc13x4_26x4, cyw30739, efr32, linux, nrfconnect, nxp, qpg, stm32, telink)
Decreases (41 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, linux, mbed, nrfconnect, psoc6, stm32)
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink)
|
* Refactored mDNS Browse Interface and necessary renaming done * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
@@ -220,13 +220,13 @@ struct CommissionNodeData | |||
char deviceName[kMaxDeviceNameLen + 1] = {}; | |||
char pairingInstruction[kMaxPairingInstructionLen + 1] = {}; | |||
|
|||
CommissionNodeData() {} | |||
DnssdNodeData() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the problem is: most of the fields of this struct are meaningless for an operational discovery, no? This struct is very much commissionee-discovery specific. So naming it general "DnssdNodeData" (but leaving the "specific to commisionable/commissioning node discovery" comment above, and having all its fields be about commissionees) does not make sense.
Also, CommonResolutionData is also "dnssd node data", but it's the data that is common to all discovery types, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed that during the first view - my thought on the PR was that this is common data, however this clearly is not, like commissionerPasscode
is clearly not an operational discovery item.
/// Callbacks for discovering nodes advertising non-operational status: | ||
/// - Commissioners | ||
/// - Nodes in commissioning modes over IP (e.g. ethernet devices, devices already | ||
/// connected to thread/wifi or devices with a commissioning window open) | ||
class CommissioningResolveDelegate | ||
class DiscoverNodeDelegate | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the comments here no longer match the code...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As requested this PR does not have the functional changes of operational discovery support so comment is not updated here. However, I have updated the comment for the delegate in the functional PR.
* Refactored mDNS Browse Interface and necessary renaming done * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
* Refactored mDNS Browse Interface and necessary renaming done * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
Refactored the existing browse/discover interface in Resolver class to a common interface for all types of node browse and made the delegates common for all browse.
This also contains renaming changes across all files where resolver interfaces are used.