#include <ControlPoint.h>
◆ ControlPoint()
UPnP::ControlPoint::ControlPoint |
( |
size_t |
maxResponseSize = 2048 | ) |
|
|
inline |
Constructor.
- Parameters
-
maxResponseSize | Limits size of stream used to receive HTTP responses |
◆ ~ControlPoint()
UPnP::ControlPoint::~ControlPoint |
( |
| ) |
|
|
inline |
◆ beginSearch() [1/5]
Searches for UPnP device.
- Parameters
-
cls | Device class object |
callback | Invoked with constructed control object |
- Return values
-
bool | true on success, false if request queue is full |
◆ beginSearch() [2/5]
Searches for UPnP service.
- Parameters
-
cls | Service class object |
callback | Invoked with constructed control object |
- Return values
-
bool | true on success, false if request queue is full |
◆ beginSearch() [3/5]
Searches for UPnP device or service and fetches its description.
- Parameters
-
urn | unique identifier of the service or device to find |
callback | Invoked with device description document |
- Return values
-
bool | true on success, false if request queue is full |
◆ beginSearch() [4/5]
Searches for UPnP device or service and returns SSDP response messages.
- Parameters
-
urn | unique identifier of the service or device to find |
callback | Invoked with SSDP response message |
- Return values
-
bool | true on success, false if request queue is full |
◆ beginSearch() [5/5]
template<typename Device >
bool UPnP::ControlPoint::beginSearch |
( |
Delegate< bool(Device &)> |
callback | ) |
|
|
inline |
◆ cancelSearch()
bool UPnP::ControlPoint::cancelSearch |
( |
| ) |
|
Cancel any active search operation.
- Return values
-
bool | true if a search was active, false if there was no active search |
- Todo:
- Set timeout on search operation and call this automatically Need to inform application though - perhaps a generic callback on the class?
◆ clear()
void UPnP::ControlPoint::clear |
( |
void |
| ) |
|
|
inline |
Perform a reset and destroy all created devices.
◆ findClass()
static const ObjectClass* UPnP::ControlPoint::findClass |
( |
const Urn & |
objectType | ) |
|
|
static |
Find a registered class.
- Parameters
-
objectType | Urn uniquely identifying the class |
- Return values
-
ObjectClass* | The class, or nullptr if not found |
◆ formatMessage()
Standard fields have been completed.
- Note
- Fields can be modified typically by adding any custom fields before sending response.
- Parameters
-
msg | The message being constructed |
ms | Template spec. for message |
- Return values
-
bool | Return true to send message, false to cancel |
Implements UPnP::BaseObject.
◆ isSearchActive()
bool UPnP::ControlPoint::isSearchActive |
( |
| ) |
const |
|
inline |
Determine if there's an active search in progress.
◆ onNotify()
virtual void UPnP::ControlPoint::onNotify |
( |
BasicMessage & |
msg | ) |
|
|
virtual |
Called by framework to handle an incoming SSDP message.
- Parameters
-
◆ onSsdpMessage()
static void UPnP::ControlPoint::onSsdpMessage |
( |
BasicMessage & |
msg | ) |
|
|
static |
Called via SSDP when incoming message received.
◆ registerClasses()
Use this method to register all device and service classes you need to control.
- Parameters
-
domain | |
classes | List of classes to register |
Class information is required in order to instantiate device or service objects in response to incoming descriptions. This information must be pre-registered with the control point.
◆ requestDescription()
Send a request for description document.
- Parameters
-
request | Description URL |
callback | To be invoked with requested document |
- Return values
-
bool | true on success, false if queue is full |
◆ reset()
void UPnP::ControlPoint::reset |
( |
| ) |
|
|
inline |
Cancel any outstanding search and reset the list of known unique service names.
◆ sendRequest()
bool UPnP::ControlPoint::sendRequest |
( |
HttpRequest * |
request | ) |
|
Send a request.
- Parameters
-
request | Completed request object: leave response stream unassigned, will be set later |
- Return values
-
bool | true on success, false if queue is full |
The documentation for this class was generated from the following file: