Arduino DLNA Server
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
tiny_dlna::DLNADevice Class Reference

Setup of a Basic DLNA Device service. The device registers itself to the network and answers to the DLNA queries and requests. A DLNA device uses UDP, Http, XML and Soap to discover and manage a service, so there is quite some complexity involved: More...

#include <DLNADevice.h>

Collaboration diagram for tiny_dlna::DLNADevice:
Collaboration graph
[legend]

Public Member Functions

bool begin (DLNADeviceInfo &device, IUDPService &udp, HttpServer &server)
 start the
 
void end ()
 Stops the processing and releases the resources.
 
bool loop ()
 call this method in the Arduino loop as often as possible
 
DLNAServiceInfo getService (const char *id)
 Provide addess to the service information.
 
DLNADeviceInfogetDevice ()
 Provides the device.
 
void setSchedulerActive (bool flag)
 We can activate/deactivate the scheduler.
 
bool isSchedulerActive ()
 Checks if the scheduler is active.
 
void setPostAliveRepeatMs (uint32_t ms)
 

Static Public Member Functions

static SubscriptionMgrgetSubscriptionMgr ()
 

Protected Member Functions

void setDevice (DLNADeviceInfo &device)
 
bool setupParser ()
 
bool setupScheduler ()
 Schedule PostAlive messages.
 
virtual bool setupDLNAServer (HttpServer &srv)
 set up Web Server to handle Service Addresses
 

Static Protected Member Functions

static void deviceXMLCallback (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 callback to provide device XML
 

Protected Attributes

Scheduler scheduler
 
DLNADeviceRequestParser parser
 
IUDPServicep_udp = nullptr
 
DLNADeviceInfop_device = nullptr
 
HttpServerp_server = nullptr
 
bool is_active = false
 
bool scheduler_active = true
 
uint32_t post_alive_repeat_ms = 0
 
SubscriptionMgr subscriptionMgr
 

Static Protected Attributes

static DLNADeviceinstance = nullptr
 

Detailed Description

Setup of a Basic DLNA Device service. The device registers itself to the network and answers to the DLNA queries and requests. A DLNA device uses UDP, Http, XML and Soap to discover and manage a service, so there is quite some complexity involved:

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

bool tiny_dlna::DLNADevice::begin ( DLNADeviceInfo device,
IUDPService udp,
HttpServer server 
)
inline

start the

◆ deviceXMLCallback()

static void tiny_dlna::DLNADevice::deviceXMLCallback ( HttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

callback to provide device XML

◆ end()

void tiny_dlna::DLNADevice::end ( )
inline

Stops the processing and releases the resources.

◆ getDevice()

DLNADeviceInfo & tiny_dlna::DLNADevice::getDevice ( )
inline

Provides the device.

◆ getService()

DLNAServiceInfo tiny_dlna::DLNADevice::getService ( const char *  id)
inline

Provide addess to the service information.

◆ getSubscriptionMgr()

static SubscriptionMgr * tiny_dlna::DLNADevice::getSubscriptionMgr ( )
inlinestatic

◆ isSchedulerActive()

bool tiny_dlna::DLNADevice::isSchedulerActive ( )
inline

Checks if the scheduler is active.

◆ loop()

bool tiny_dlna::DLNADevice::loop ( )
inline

call this method in the Arduino loop as often as possible

◆ setDevice()

void tiny_dlna::DLNADevice::setDevice ( DLNADeviceInfo device)
inlineprotected

◆ setPostAliveRepeatMs()

void tiny_dlna::DLNADevice::setPostAliveRepeatMs ( uint32_t  ms)
inline

Repeat the post-alive messages (default: 0 = no repeat). Call this method before calling begin!

◆ setSchedulerActive()

void tiny_dlna::DLNADevice::setSchedulerActive ( bool  flag)
inline

We can activate/deactivate the scheduler.

◆ setupDLNAServer()

virtual bool tiny_dlna::DLNADevice::setupDLNAServer ( HttpServer srv)
inlineprotectedvirtual

set up Web Server to handle Service Addresses

◆ setupParser()

bool tiny_dlna::DLNADevice::setupParser ( )
inlineprotected

MSearch requests reply to upnp:rootdevice and the device type defined in the device

◆ setupScheduler()

bool tiny_dlna::DLNADevice::setupScheduler ( )
inlineprotected

Schedule PostAlive messages.

Member Data Documentation

◆ instance

DLNADevice* tiny_dlna::DLNADevice::instance = nullptr
inlinestaticprotected

◆ is_active

bool tiny_dlna::DLNADevice::is_active = false
protected

◆ p_device

DLNADeviceInfo* tiny_dlna::DLNADevice::p_device = nullptr
protected

◆ p_server

HttpServer* tiny_dlna::DLNADevice::p_server = nullptr
protected

◆ p_udp

IUDPService* tiny_dlna::DLNADevice::p_udp = nullptr
protected

◆ parser

DLNADeviceRequestParser tiny_dlna::DLNADevice::parser
protected

◆ post_alive_repeat_ms

uint32_t tiny_dlna::DLNADevice::post_alive_repeat_ms = 0
protected

◆ scheduler

Scheduler tiny_dlna::DLNADevice::scheduler
protected

◆ scheduler_active

bool tiny_dlna::DLNADevice::scheduler_active = true
protected

◆ subscriptionMgr

SubscriptionMgr tiny_dlna::DLNADevice::subscriptionMgr
protected

The documentation for this class was generated from the following file: