23#ifndef NETWORKMONITOR_H
24#define NETWORKMONITOR_H
32#include <netlistmgr.h>
67 ULONG STDMETHODCALLTYPE
AddRef()
override;
68 ULONG STDMETHODCALLTYPE
Release()
override;
69 HRESULT STDMETHODCALLTYPE
QueryInterface(REFIID riid,
void** ppvObject)
override;
78 void checkConnectionState();
79 mutable std::mutex m_mutex;
83 CComPtr<INetworkListManager> m_netListManager;
84 CComPtr<IConnectionPoint> m_connectionPoint;
87 unsigned long m_networkChangedHandlerId;
An event that can have handlers subscribe to it, which in turn will be called when the event is invok...
Definition event.h:49
A monitor of the system's network connection.
Definition networkmonitor.h:45
HRESULT STDMETHODCALLTYPE NetworkConnectionPropertyChanged(GUID connectionId, NLM_CONNECTION_PROPERTY_CHANGE newProperty)
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) override
Events::Event< NetworkStateChangedEventArgs > & stateChanged()
Gets the StateChanged event. This event is invoked whenever the state of the network connection chang...
~NetworkMonitor()
Destructs a NetworkMonitor.
HRESULT STDMETHODCALLTYPE ConnectivityChanged(NLM_CONNECTIVITY newConnectivity) override
ULONG STDMETHODCALLTYPE AddRef() override
NetworkMonitor()
Constructs a NetworkMonitor. This method will call checkConnectionState() to get the initial system n...
NetworkState getConnectionState() const
Gets the state of the network connection.
ULONG STDMETHODCALLTYPE Release() override
Definition addressfamily.h:11
NetworkState
States of a network connection.
Definition networkstate.h:32