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() noexcept;
79 mutable std::mutex m_mutex;
83 CComPtr<INetworkListManager> m_netListManager;
84 CComPtr<IConnectionPoint> m_connectionPoint;
87 unsigned long m_networkChangedHandlerId;
HRESULT STDMETHODCALLTYPE NetworkConnectionPropertyChanged(GUID connectionId, NLM_CONNECTION_PROPERTY_CHANGE newProperty)
Events::Event< NetworkStateChangedEventArgs > & stateChanged() noexcept
Gets the StateChanged event. This event is invoked whenever the state of the network connection chang...
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) override
NetworkState getConnectionState() const noexcept
Gets the state of the network connection.
HRESULT STDMETHODCALLTYPE ConnectivityChanged(NLM_CONNECTIVITY newConnectivity) override
ULONG STDMETHODCALLTYPE AddRef() override
~NetworkMonitor() noexcept
Destructs a NetworkMonitor.
NetworkMonitor()
Constructs a NetworkMonitor. This method will call checkConnectionState() to get the initial system n...
ULONG STDMETHODCALLTYPE Release() override
An event argument for when the network state is changed.
Definition networkstatechangedeventargs.h:35
Definition ipv4address.h:30
NetworkState
States of a network connection.
Definition networkstate.h:32