[sigslot] - Remove sigslot form NetworkMonitorInterface.
Bug: webrtc:11943 Change-Id: Iddedb2840e437dfbffcb0d6cbf71a09b0030fbab Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226869 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34573}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
9b6cd191ef
commit
3707793a57
@ -11,8 +11,10 @@
|
||||
#ifndef RTC_BASE_NETWORK_MONITOR_H_
|
||||
#define RTC_BASE_NETWORK_MONITOR_H_
|
||||
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
#include "rtc_base/network_constants.h"
|
||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||
|
||||
namespace rtc {
|
||||
|
||||
@ -73,8 +75,6 @@ class NetworkMonitorInterface {
|
||||
NetworkMonitorInterface();
|
||||
virtual ~NetworkMonitorInterface();
|
||||
|
||||
sigslot::signal0<> SignalNetworksChanged;
|
||||
|
||||
virtual void Start() = 0;
|
||||
virtual void Stop() = 0;
|
||||
|
||||
@ -110,6 +110,20 @@ class NetworkMonitorInterface {
|
||||
virtual bool IsAdapterAvailable(const std::string& interface_name) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetNetworksChangedCallback(std::function<void()> callback) {
|
||||
networks_changed_callback_ = std::move(callback);
|
||||
}
|
||||
|
||||
protected:
|
||||
void InvokeNetworksChangedCallback() {
|
||||
if (networks_changed_callback_) {
|
||||
networks_changed_callback_();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
std::function<void()> networks_changed_callback_;
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
||||
Reference in New Issue
Block a user