Stroika Library
3.0d18
Help-Home
Loading...
Searching...
No Matches
SearchResponder.h
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3
*/
4
#ifndef _Stroika_Frameworks_UPnP_SSDP_Server_SearchResponder_h_
5
#define _Stroika_Frameworks_UPnP_SSDP_Server_SearchResponder_h_ 1
6
7
#include "Stroika/Frameworks/StroikaPreComp.h"
8
9
#include "
Stroika/Foundation/Characters/String.h
"
10
#include "Stroika/Foundation/Common/Common.h"
11
#include "
Stroika/Foundation/Execution/Thread.h
"
12
#include "
Stroika/Foundation/Traversal/Iterable.h
"
13
14
#include "Stroika/Frameworks/UPnP/Device.h"
15
16
/*
17
* \file
18
*
19
* \note Code-Status: <a href="Code-Status.md#Alpha">Alpha</a>
20
*
21
* TODO:
22
* @todo Look at http://brisa.garage.maemo.org/doc/html/upnp/ssdp.html for example server API
23
*/
24
25
namespace
Stroika::Frameworks::UPnP::SSDP::Server {
26
27
using
Traversal::Iterable;
28
29
/**
30
* Instantiating the class starts the (background) search automatically, and it continues
31
* until the SearchResponder object is destroyed.
32
*
33
* \note - this behavior differs from Stroika 2.1, where you had to explicitly call Run ()
34
*
35
* \note this uses its own thread, rather than using IntervalTimer, because it waits on input
36
* from the network, and must always be running/waiting
37
*/
38
class
SearchResponder
{
39
public
:
40
/**
41
*/
42
SearchResponder
(
const
Iterable<Advertisement>
& advertisements,
43
IO::Network::InternetProtocol::IP::IPVersionSupport
ipVersion = IO::Network::InternetProtocol::IP::IPVersionSupport::eDEFAULT);
44
SearchResponder
(
const
SearchResponder
&) =
delete
;
45
46
public
:
47
const
SearchResponder
operator= (
const
SearchResponder
&) =
delete
;
48
49
public
:
50
~SearchResponder
() =
default
;
51
52
#if 0
53
//...
54
//Get/Set supported DeviceEntries ();
55
56
//Get/Set Refresh/MaxAge (default is autocompute refresh pace based on maxage)
57
58
// smart ptr to one of these - caller keeps it around, it runs in its own
59
// thread as needed, does responses etc.
60
#endif
61
private
:
62
Execution::Thread::CleanupPtr
fListenThread_{Execution::Thread::CleanupPtr::eAbortBeforeWaiting};
63
};
64
65
}
66
67
/*
68
********************************************************************************
69
***************************** Implementation Details ***************************
70
********************************************************************************
71
*/
72
#include "SearchResponder.inl"
73
74
#endif
/*_Stroika_Frameworks_UPnP_SSDP_Server_PeriodicNotifier_h_*/
Iterable.h
String.h
Thread.h
Stroika::Foundation::Execution::Thread::CleanupPtr
Definition
Thread.h:781
Stroika::Foundation::Traversal::Iterable
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
Definition
Iterable.h:237
Stroika::Frameworks::UPnP::SSDP::Server::SearchResponder
Definition
SearchResponder.h:38
Stroika::Foundation::IO::Network::InternetProtocol::IP::IPVersionSupport
IPVersionSupport
Definition
IP.h:36
Library
Sources
Stroika
Frameworks
UPnP
SSDP
Server
SearchResponder.h
Generated by
1.9.8