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

[mdns] refactor mDNS State subscription #2560

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

Irving-cl
Copy link
Contributor

This PR refactors the mDNS State subscription using the Subject-Observer pattern.

The PR makes the state subscription more flexible. Currently the mDNS state is published in Application::HandleMdnsState. Now we have both NCP and RCP case. This function will be difficult to implement. With this new pattern, we can register different observers during NCP/RCP initialization.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.97%. Comparing base (2b41187) to head (1de3e32).
Report is 845 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2560      +/-   ##
==========================================
- Coverage   55.77%   45.97%   -9.81%     
==========================================
  Files          87      104      +17     
  Lines        6890    12392    +5502     
  Branches        0      904     +904     
==========================================
+ Hits         3843     5697    +1854     
- Misses       3047     6385    +3338     
- Partials        0      310     +310     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/border_agent/border_agent.hpp Outdated Show resolved Hide resolved
src/mdns/mdns.hpp Show resolved Hide resolved
src/mdns/mdns.hpp Show resolved Hide resolved
src/sdp_proxy/advertising_proxy.hpp Outdated Show resolved Hide resolved
src/sdp_proxy/discovery_proxy.hpp Outdated Show resolved Hide resolved
@Irving-cl Irving-cl force-pushed the refactor_mdns_state_subscription branch 2 times, most recently from f211c4d to d9a9c9d Compare October 25, 2024 07:13
@Irving-cl Irving-cl requested a review from superwhd October 25, 2024 07:25
src/mdns/mdns.hpp Outdated Show resolved Hide resolved
src/mdns/mdns.hpp Outdated Show resolved Hide resolved
@Irving-cl Irving-cl force-pushed the refactor_mdns_state_subscription branch from d9a9c9d to 1de3e32 Compare October 28, 2024 10:50
@Irving-cl Irving-cl requested a review from superwhd October 28, 2024 10:54
Copy link
Contributor

@superwhd superwhd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Irving-cl Irving-cl requested a review from jwhui October 29, 2024 10:55
@jwhui jwhui merged commit aa00c76 into openthread:main Oct 29, 2024
32 checks passed
@Irving-cl Irving-cl deleted the refactor_mdns_state_subscription branch November 6, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants