4#ifndef _Stroika_Frameworks_UPnP_SSDP_Server_PeriodicNotifier_h_
5#define _Stroika_Frameworks_UPnP_SSDP_Server_PeriodicNotifier_h_ 1
7#include "Stroika/Frameworks/StroikaPreComp.h"
10#include "Stroika/Foundation/Common/Common.h"
15#include "Stroika/Frameworks/UPnP/Device.h"
18#include "Stroika/Frameworks/UPnP/SSDP/Server/LocationProvider.h"
26namespace Stroika::Frameworks::UPnP::SSDP::Server {
28 using Traversal::Iterable;
78 InterfaceFilter fInterfaces{DefaultInterfaceFilter};
86 bool fFollowNetworkChanges{
true};
88 static const Options kDefaultOptions;
106 PeriodicNotifier (
const Iterable<Advertisement>& advertisements,
const LocationProvider& location,
const Options& options = kDefaultOptions);
107 PeriodicNotifier (
const PeriodicNotifier&) =
delete;
110 const PeriodicNotifier operator= (
const PeriodicNotifier&) =
delete;
128 shared_ptr<Execution::Synchronized<IO::Network::InterfacesByID>> fNotifyingOn_;
129 function<void ()> fSayByebye_;
130 unique_ptr<Execution::IntervalTimer::Adder> fIntervalTimerAdder_;
131 optional<SSDP::Private_::NetworkChangeFollower> fNetworkChanges_;
141#include "PeriodicNotifier.inl"
constexpr uint8_t kDefaultMulticastTTL
The TTL (IPv6: hop limit) multicast SSDP packets - NOTIFYs and M-SEARCHes - go out with,...
chrono::duration< double > DurationSeconds
chrono::duration<double> - a time span (length of time) measured in seconds, but high precision.
nonvirtual IO::Network::InterfacesByID GetNetworkInterfaces() const
The network interfaces its last NOTIFYs went out of - as they were then (so with the addresses they h...
~PeriodicNotifier()
Stops the NOTIFYs, then sends an ssdp:byebye for each advertisement, out of each interface its last N...
Containers::KeyedCollection< Interface, Interface::SystemIDType, Containers::KeyedCollection_DefaultTraits< Interface, Interface::SystemIDType, Interface::IDExtractor > > InterfacesByID
Interfaces seen at one moment (e.g. one SystemInterfacesMgr::GetAll ()), keyed by fInterfaceID.