4#ifndef _Stroika_Frameworks_UPnP_GENA_Subscriber_h_
5#define _Stroika_Frameworks_UPnP_GENA_Subscriber_h_ 1
7#include "Stroika/Frameworks/StroikaPreComp.h"
14#include "Stroika/Foundation/Containers/Mapping.h"
17#include "Stroika/Foundation/IO/Network/Transfer/Connection.h"
21#include "Stroika/Frameworks/WebServer/Message.h"
29namespace Stroika::Frameworks::UPnP::GENA {
31 using Foundation::Characters::String;
32 using Foundation::Containers::Mapping;
33 using Foundation::IO::Network::URI;
106 static const Options kDefaultOptions;
112 Subscriber (
const URI& eventSubURL,
const URI& callbackURL,
const function<
void (
const Event&)>& onEvent,
const Options& options = kDefaultOptions);
129 nonvirtual
void Start ();
136 nonvirtual
void Stop ();
142 nonvirtual optional<String>
GetSID ()
const;
161 unique_ptr<Rep_> fRep_;
chrono::duration< double > DurationSeconds
chrono::duration<double> - a time span (length of time) measured in seconds, but high precision.
String is like std::u32string, except it is much easier to use, often much more space efficient,...
A Mapping uniquely associates two elements: a key and a value (use Assocation to allow multiple value...
A control point's subscription to a UPnP service's events (UPnP Device Architecture 1....
nonvirtual optional< String > GetSID() const
nonvirtual void Start()
Subscribe - throwing if the service does not take it - and keep it renewed. Started already: does not...
nonvirtual void Stop()
Unsubscribe - failing quietly, as the service then drops it at its TIMEOUT - so no more events are re...
nonvirtual void HandleNotify(WebServer::Message &m)
A NOTIFY at the callback URL - answered as UPnP Device Architecture 1.1, section 4....
static URI MakeCallbackURL(const URI &eventSubURL, Foundation::IO::Network::PortType port, const String &path)
A callback URL for the service at eventSubURL: http, at this machine's address on the network the ser...
How XML is read and written - for now, with which provider - taken last by each XML function (DOM::Do...
Foundation::Time::DurationSeconds fTimeout
function< Foundation::IO::Network::Transfer::Connection::Ptr(const URI &to)> fConnectionFactory
How each SUBSCRIBE, renewal and UNSUBSCRIBE gets its connection, given the event URL it goes to - by ...
Foundation::DataExchange::XML::Options fXMLOptions
How an event's XML is read - by default, with Stroika's default provider; nearly always left as is (.