mirror of
https://gitee.com/openharmony/communication_wifi.git
synced 2024-11-23 07:00:07 +00:00
update
Signed-off-by: yangpengfei <yangpengfei34@huawei.com>
This commit is contained in:
parent
552efc3a90
commit
0b9c73cf7b
@ -157,26 +157,13 @@ void SavedNetworkTracker::GetCandidatesFromSubNetworkSelector()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SuggestionNetworkTracker::SuggestionNetworkTracker() : CompositeNetworkSelector("suggestionNetworkTracker")
|
SuggestionNetworkTracker::SuggestionNetworkTracker() : SimpleNetworkSelector("suggestionNetworkTracker")
|
||||||
{
|
{
|
||||||
auto andFilter = make_shared<AndWifiFilter>();
|
auto andFilter = make_shared<AndWifiFilter>();
|
||||||
andFilter->AddFilter(make_shared<SuggestionNetworkWifiFilter>());
|
andFilter->AddFilter(make_shared<SuggestionNetworkWifiFilter>());
|
||||||
andFilter->AddFilter(make_shared<DisableWifiFilter>());
|
andFilter->AddFilter(make_shared<DisableWifiFilter>());
|
||||||
SetWifiFilter(andFilter);
|
SetWifiFilter(andFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SuggestionNetworkTracker::Nominate(NetworkCandidate &networkCandidate)
|
|
||||||
{
|
|
||||||
networkCandidates.emplace_back(&networkCandidate);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SuggestionNetworkTracker::GetCandidatesFromSubNetworkSelector()
|
|
||||||
{
|
|
||||||
for (const auto &subNetworkSelector : subNetworkSelectors) {
|
|
||||||
subNetworkSelector->GetBestCandidates(networkCandidates);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleFilterNetworkSelector::SimpleFilterNetworkSelector(const std::string &networkSelectorName)
|
SimpleFilterNetworkSelector::SimpleFilterNetworkSelector(const std::string &networkSelectorName)
|
||||||
: SimpleNetworkSelector(networkSelectorName), SimpleWifiFilter(networkSelectorName) {}
|
: SimpleNetworkSelector(networkSelectorName), SimpleWifiFilter(networkSelectorName) {}
|
||||||
|
@ -45,12 +45,9 @@ protected:
|
|||||||
void GetCandidatesFromSubNetworkSelector() override;
|
void GetCandidatesFromSubNetworkSelector() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SuggestionNetworkTracker final: public CompositeNetworkSelector {
|
class SuggestionNetworkTracker final: public SimpleNetworkSelector {
|
||||||
public:
|
public:
|
||||||
SuggestionNetworkTracker();
|
SuggestionNetworkTracker();
|
||||||
protected:
|
|
||||||
bool Nominate(NetworkCandidate &networkCandidate) override;
|
|
||||||
void GetCandidatesFromSubNetworkSelector() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class SimpleFilterNetworkSelector : public SimpleNetworkSelector, public SimpleWifiFilter {
|
class SimpleFilterNetworkSelector : public SimpleNetworkSelector, public SimpleWifiFilter {
|
||||||
|
Loading…
Reference in New Issue
Block a user