Arduino DLNA Server
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
tiny_dlna::DLNAMediaServer< ClientType > Class Template Reference

Digital Media Server implementation. More...

#include <DLNAMediaServer.h>

Inheritance diagram for tiny_dlna::DLNAMediaServer< ClientType >:
Inheritance graph
[legend]

Classes

struct  ActionRule
 Individual action rule for handling specific actions. More...
 

Public Types

using HttpClient = ClientType
 
using DeviceType = DLNADevice< ClientType >
 
typedef void(* PrepareDataCallback) (const char *objectID, ContentQueryType queryType, const char *filter, int startingIndex, int requestedCount, const char *sortCriteria, int &numberReturned, int &totalMatches, int &updateID, void *reference)
 
typedef bool(* GetDataCallback) (int index, MediaItem &item, void *reference)
 Callback: retrieve MediaItem by index. Returns true if item is valid.
 
typedef size_t(* GetDataCallbackPrint) (int index, Print &out, void *reference)
 

Public Member Functions

 DLNAMediaServer ()
 Default constructor: initialize device info and defaults.
 
 DLNAMediaServer (IHttpServer &server, IUDPService &udp)
 Construct MediaServer with an HttpServer and IUDPService pre-set.
 
 ~DLNAMediaServer ()
 Destructor.
 
void setHttpServer (IHttpServer &server)
 Set the http server instance the MediaServer should use.
 
void setUdpService (IUDPService &udp)
 Set the UDP service instance the MediaServer should use.
 
bool begin ()
 
void end ()
 Stops the processing and releases the resources.
 
bool loop (int loopAction=RUN_ALL)
 call this method in the Arduino loop as often as possible
 
void setSearchCapabilities (const char *caps)
 Define the search capabilities: use csv.
 
const char * getSearchCapabilities ()
 Get the search capabilities string (CSV)
 
void setSortCapabilities (const char *caps)
 Define the sort capabilities: use csv.
 
const char * getSortCapabilities ()
 Get the sort capabilities string (CSV)
 
void setConnectionID (const char *id)
 Set the active ConnectionID for the connection manager.
 
const char * getConnectionID ()
 Return the currently configured ConnectionID.
 
void setProtocols (const char *source, const char *sink="")
 Define the source protocol info: use csv Default is http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_50_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_60_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_HD_NA_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AC3,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_CIF15_AAC_520,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_CIF30_AAC_940,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L31_HD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L32_HD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L3L_SD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_HP_HD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_1080i_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_720p_AAC,http-get:*:video/mp4:DLNA.ORG_PN=MPEG4_P2_MP4_ASP_AAC,http-get:*:video/mp4:DLNA.ORG_PN=MPEG4_P2_MP4_SP_VGA_AAC,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPLL_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_MP3,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMALSL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMALSL_MULT5,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320,http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM,http-get:*:image/jpeg:*,http-get:*:video/avi:*,http-get:*:video/divx:*,http-get:*:video/x-matroska:*,http-get:*:video/mpeg:*,http-get:*:video/mp4:*,http-get:*:video/x-ms-wmv:*,http-get:*:video/x-msvideo:*,http-get:*:video/x-flv:*,http-get:*:video/x-tivo-mpeg:*,http-get:*:video/quicktime:*,http-get:*:audio/mp4:*,http-get:*:audio/x-wav:*,http-get:*:audio/x-flac:*,http-get:*:audio/x-dsd:*,http-get:*:application/ogg:http-get::application/vnd.rn-realmedia:http-get::application/vnd.rn-realmedia-vbr:http-get::video/webm:*.
 
const char * getSourceProtocols ()
 Get the current source ProtocolInfo string.
 
const char * getSinkProtocols ()
 Get the current sink ProtocolInfo string.
 
void setPrepareDataCallback (PrepareDataCallback cb)
 Sets the callback that prepares the data for the Browse and Search.
 
void setGetDataCallback (GetDataCallback cb)
 Sets the data callback that provides a MediaItem by index.
 
void setGetDataCallback (GetDataCallbackPrint cb)
 Sets the alternative data callback that prints a DIDL entry directly.
 
void setReference (void *ref)
 Sets a user reference pointer, available in callbacks.
 
IHttpServergetHttpServer ()
 Provides access to the http server.
 
int getSystemUpdateID ()
 Provides access to the system update ID.
 
int incrementSystemUpdateID ()
 
IDevicedevice ()
 Provides access to the internal DLNA device instance.
 
void setSubscriptionsActive (bool flag)
 Enable/disable subscription notifications.
 
bool isSubscriptionsActive ()
 Query whether subscription notifications are active.
 
void setCustomActionRule (const char *suffix, bool(*handler)(IClientHandler *, DLNAMediaServer *, ActionRequest &, IHttpServer &))
 Define your own custom logic.
 
void setContentDirectoryDescr (DLNADescr &d)
 Set a custom ContentDirectory SCPD descriptor (per-instance)
 
DLNADescrgetContentDirectoryDescr ()
 Get pointer to the per-instance ContentDirectory descriptor.
 
void setConnectionMgrDescr (DLNADescr &d)
 Set a custom ConnectionManager SCPD descriptor (per-instance)
 
DLNADescrgetConnectionMgrDescr ()
 Get pointer to the per-instance ConnectionManager descriptor.
 
void logStatus ()
 Log current status of subscriptions and scheduler.
 
size_t print (Print &out, void *ref=nullptr)
 renders the device xml into the provided Print output.
 
void setDeviceType (const char *st)
 
const char * getDeviceType ()
 
void setUDN (const char *id)
 Define the udn uuid.
 
const char * getUDN ()
 Provide the udn uuid.
 
void setBaseURL (const char *url)
 Defines the base url.
 
void setBaseURL (IPAddress ip, int port, const char *path=nullptr)
 Defines the base URL.
 
const char * getBaseURL ()
 Provides the base url.
 
UrlgetDeviceURL ()
 This method returns base url/device.xml.
 
void setIPAddress (IPAddress address)
 Defines the local IP address.
 
IPAddress getIPAddress ()
 Provides the local IP address.
 
const char * getIPStr ()
 Provides the local address as string.
 
void setNS (const char *ns)
 
const char * getNS ()
 
void setFriendlyName (const char *name)
 
const char * getFriendlyName ()
 
void setManufacturer (const char *man)
 
const char * getManufacturer ()
 
void setManufacturerURL (const char *url)
 
const char * getManufacturerURL ()
 
void setModelDescription (const char *descr)
 
const char * getModelDescription ()
 
void setModelName (const char *name)
 
const char * getModelName ()
 
void setModelNumber (const char *number)
 
const char * getModelNumber ()
 
void setSerialNumber (const char *sn)
 
const char * getSerialNumber ()
 
void setUniversalProductCode (const char *upc)
 
const char * getUniversalProductCode ()
 
void addService (DLNAServiceInfo s)
 Adds a service definition.
 
DLNAServiceInfogetService (const char *id)
 Finds a service definition by name.
 
DLNAServiceInfogetServiceByAbbrev (const char *abbrev)
 Finds a service definition by name.
 
Vector< DLNAServiceInfo > & getServices ()
 Provides all service definitions.
 
void clear ()
 Clears all device information.
 
void clearIcons ()
 Overwrite the default icon.
 
void addIcon (Icon icon)
 adds an icon
 
Icon getIcon (int idx=0)
 Provides the item at indix.
 
Vector< Icon > & getIcons ()
 Provides all icons.
 
void setActive (bool flag)
 Sets the server to inactive.
 
 operator bool ()
 return true if active
 
virtual bool loop ()
 loop processing
 
void setSubscriptionActive (bool flag)
 
bool isSubscriptionActive ()
 

Protected Member Functions

void addChange (const char *serviceAbbrev, std::function< size_t(Print &, void *)> changeWriter)
 
void publishAVT ()
 Publish a ContentDirectory event (SystemUpdateID)
 
void publishCMS ()
 Publish a ConnectionManager event (CurrentConnectionIDs)
 
void setupServicesImpl (IHttpServer *server)
 Setup the service endpoints.
 
void setupContentDirectoryService (IHttpServer *server)
 Setup and register ContentDirectory service.
 
void setupConnectionManagerService (IHttpServer *server)
 Setup and register ConnectionManager service.
 
bool processAction (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Process action requests using rules-based dispatch.
 
bool processActionBrowse (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ContentDirectory:Browse action.
 
bool processActionSearch (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ContentDirectory:Search action.
 
bool processActionGetSearchCapabilities (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ContentDirectory:GetSearchCapabilities action.
 
bool processActionGetSortCapabilities (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ContentDirectory:GetSortCapabilities action.
 
bool processActionGetSystemUpdateID (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ContentDirectory:GetSystemUpdateID action.
 
bool processActionGetProtocolInfo (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Replies with Source and Sink protocol lists (CSV protocolInfo strings)
 
bool processActionGetCurrentConnectionIDs (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ConnectionManager:GetCurrentConnectionIDs action.
 
bool processActionGetCurrentConnectionInfo (ActionRequest &action, IHttpServer &server, IClientHandler &client)
 Handle ConnectionManager:GetCurrentConnectionInfo action.
 
ContentQueryType parseContentQueryType (const char *flag)
 Common helper to stream a ContentDirectory response (Browse or Search)
 
size_t soapEnvelopeStart (Print &out)
 
size_t soapEnvelopeEnd (Print &out)
 
size_t actionResponseStart (Print &out, const char *responseName, const char *serviceNS)
 
size_t actionResponseEnd (Print &out, const char *responseName)
 
size_t streamActionItems (Print &out, const char *responseName, int startingIndex)
 
size_t streamDIDL (Print &out, int numberReturned, int startingIndex)
 Stream DIDL-Lite payload for a Browse/Search result.
 
size_t streamDIDLItems (Print &out, int numberReturned, int startingIndex)
 
size_t streamDIDLItem (Print &out, const MediaItem &item)
 
Str getUri (const char *path)
 Complete Uri.
 
const char * toStr (MediaItemClass itemClass)
 convert MediaItemClass to UPnP class string
 
void setupRules ()
 
virtual void setupServices (IHttpServer &server, IUDPService &udp)
 to be implemented by subclasses
 
size_t printRoot (Print &out, void *ref)
 
size_t printDevice (Print &out, void *ref)
 
size_t printSpecVersion (Print &out, void *ref)
 
size_t printServiceList (Print &out, void *ref)
 
size_t printService (Print &out, void *srv)
 
size_t printIconList (Print &out, void *ref)
 
size_t printIconDlnaInfo (Print &out, Icon *icon)
 

Static Protected Member Functions

static void contentDescCB (IClientHandler &client, IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 Static descriptor callback for ContentDirectory SCPD.
 
static void connDescCB (IClientHandler &client, IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 Static descriptor callback for ConnectionManager SCPD.
 
static void eventSubscriptionHandler (IClientHandler &client, IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 After the subscription we publish all relevant properties.
 
static void contentDirectoryControlCB (IClientHandler &client, IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 Control handler for ContentDirectory service.
 
static DLNAMediaServergetMediaServer (IHttpServer *server)
 Helper to retrieve DLNAMediaServer instance from HttpServer reference chain.
 
static void connmgrControlCB (IClientHandler &client, IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 simple connection manager control that replies OK
 

Protected Attributes

DeviceType dlna_device
 
PrepareDataCallback prepare_data_cb = nullptr
 
GetDataCallback get_data_cb = nullptr
 
GetDataCallbackPrint get_data_print_cb = nullptr
 
IHttpServerp_server = nullptr
 
IUDPServicep_udp_member = nullptr
 
void * reference_ = nullptr
 
GetDataCallback g_stream_get_data_cb = nullptr
 
int g_stream_numberReturned = 0
 
int g_stream_totalMatches = 0
 
int g_stream_updateID = 1
 
int g_stream_startingIndex = 0
 
void * g_stream_reference = nullptr
 
const char * st = "urn:schemas-upnp-org:device:MediaServer:1"
 
const char * usn = "uuid:media-server-0000-0000-0000-000000000001"
 
const char * g_search_capabiities
 
const char * g_sort_capabilities
 
const char * sourceProto = DLNA_PROTOCOL_AUDIO
 
const char * sinkProto = ""
 
const char * connectionID = "0"
 
Vector< ActionRulerules
 
DLNAMediaServerContentDirectoryDescr default_contentDirectoryDescr
 
DLNADescrp_contentDirectoryDescr = &default_contentDirectoryDescr
 
DLNAMediaServerConnectionMgrDescr default_connectionMgrDescr
 
DLNADescrp_connmgrDescr = &default_connectionMgrDescr
 
bool is_active = false
 
Url device_url
 
IPAddress localhost
 
int version_major = 1
 
int version_minor = 0
 
Str base_url = "http://localhost:9876/dlna"
 
Str udn = "uuid:09349455-2941-4cf7-9847-0dd5ab210e97"
 
Str ns = "xmlns=\"urn:schemas-upnp-org:device-1-0\""
 
Str device_type
 
Str friendly_name
 
Str manufacturer
 
Str manufacturer_url
 
Str model_description
 
Str model_name
 
Str model_url
 
Str model_number
 
Str serial_number
 
Str universal_product_code
 
Vector< DLNAServiceInfoservices
 
Vector< Iconicons
 
Str url_str
 
bool is_subcription_active = false
 

Detailed Description

template<typename ClientType>
class tiny_dlna::DLNAMediaServer< ClientType >

Digital Media Server implementation.

Lightweight DLNA MediaServer with ContentDirectory (Browse/Search) and ConnectionManager services. Register PrepareDataCallback and GetDataCallback and optionally setReference(void*) for custom context.

This class provides a complete DLNA Digital Media Server (DMS) implementation supporting:

Usage:

  1. Create an instance with HttpServer and IUDPService
  2. Set callbacks for content preparation and retrieval
  3. Call begin() to start the server
  4. Call loop() repeatedly to process requests
Template Parameters
ClientTypeArduino Client implementation used for outbound HTTP control and event traffic (e.g. WiFiClient, EthernetClient).

Author: Phil Schatzmann

Member Typedef Documentation

◆ DeviceType

template<typename ClientType >
using tiny_dlna::DLNAMediaServer< ClientType >::DeviceType = DLNADevice<ClientType>

◆ GetDataCallback

template<typename ClientType >
typedef bool(* tiny_dlna::DLNAMediaServer< ClientType >::GetDataCallback) (int index, MediaItem &item, void *reference)

Callback: retrieve MediaItem by index. Returns true if item is valid.

◆ GetDataCallbackPrint

template<typename ClientType >
typedef size_t(* tiny_dlna::DLNAMediaServer< ClientType >::GetDataCallbackPrint) (int index, Print &out, void *reference)

Alternative callback: directly print DIDL entry for given index to out. Returns number of bytes written; return 0 to stop iteration early.

◆ HttpClient

template<typename ClientType >
using tiny_dlna::DLNAMediaServer< ClientType >::HttpClient = ClientType

◆ PrepareDataCallback

template<typename ClientType >
typedef void(* tiny_dlna::DLNAMediaServer< ClientType >::PrepareDataCallback) (const char *objectID, ContentQueryType queryType, const char *filter, int startingIndex, int requestedCount, const char *sortCriteria, int &numberReturned, int &totalMatches, int &updateID, void *reference)

Callback: prepare data for Browse/Search. Fills numberReturned, totalMatches and updateID. Last parameter is user reference pointer.

Constructor & Destructor Documentation

◆ DLNAMediaServer() [1/2]

template<typename ClientType >
tiny_dlna::DLNAMediaServer< ClientType >::DLNAMediaServer ( )
inline

Default constructor: initialize device info and defaults.

◆ DLNAMediaServer() [2/2]

template<typename ClientType >
tiny_dlna::DLNAMediaServer< ClientType >::DLNAMediaServer ( IHttpServer server,
IUDPService udp 
)
inline

Construct MediaServer with an HttpServer and IUDPService pre-set.

◆ ~DLNAMediaServer()

template<typename ClientType >
tiny_dlna::DLNAMediaServer< ClientType >::~DLNAMediaServer ( )
inline

Destructor.

Member Function Documentation

◆ actionResponseEnd()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::actionResponseEnd ( Print &  out,
const char *  responseName 
)
inlineprotected

◆ actionResponseStart()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::actionResponseStart ( Print &  out,
const char *  responseName,
const char *  serviceNS 
)
inlineprotected

◆ addChange()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::addChange ( const char *  serviceAbbrev,
std::function< size_t(Print &, void *)>  changeWriter 
)
inlineprotected

serviceAbbrev: e.g. "AVT" or subscription namespace abbrev defined for the service

◆ addIcon()

void tiny_dlna::DLNADeviceInfo::addIcon ( Icon  icon)
inlineinherited

adds an icon

◆ addService()

void tiny_dlna::DLNADeviceInfo::addService ( DLNAServiceInfo  s)
inlineinherited

Adds a service definition.

◆ begin()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::begin ( )
inlinevirtual

Start the underlying DLNA device using previously provided UDP and HTTP server. Call this after constructing MediaServer(HttpServer&, IUDPService&)

Reimplemented from tiny_dlna::DLNADeviceInfo.

◆ clear()

void tiny_dlna::DLNADeviceInfo::clear ( )
inlineinherited

Clears all device information.

◆ clearIcons()

void tiny_dlna::DLNADeviceInfo::clearIcons ( )
inlineinherited

Overwrite the default icon.

◆ connDescCB()

template<typename ClientType >
static void tiny_dlna::DLNAMediaServer< ClientType >::connDescCB ( IClientHandler client,
IHttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

Static descriptor callback for ConnectionManager SCPD.

◆ connmgrControlCB()

template<typename ClientType >
static void tiny_dlna::DLNAMediaServer< ClientType >::connmgrControlCB ( IClientHandler client,
IHttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

simple connection manager control that replies OK

◆ contentDescCB()

template<typename ClientType >
static void tiny_dlna::DLNAMediaServer< ClientType >::contentDescCB ( IClientHandler client,
IHttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

Static descriptor callback for ContentDirectory SCPD.

◆ contentDirectoryControlCB()

template<typename ClientType >
static void tiny_dlna::DLNAMediaServer< ClientType >::contentDirectoryControlCB ( IClientHandler client,
IHttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

Control handler for ContentDirectory service.

◆ device()

template<typename ClientType >
IDevice & tiny_dlna::DLNAMediaServer< ClientType >::device ( )
inline

Provides access to the internal DLNA device instance.

◆ end()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::end ( )
inline

Stops the processing and releases the resources.

◆ eventSubscriptionHandler()

template<typename ClientType >
static void tiny_dlna::DLNAMediaServer< ClientType >::eventSubscriptionHandler ( IClientHandler client,
IHttpServer server,
const char *  requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

After the subscription we publish all relevant properties.

◆ getBaseURL()

const char * tiny_dlna::DLNADeviceInfo::getBaseURL ( )
inlineinherited

Provides the base url.

◆ getConnectionID()

template<typename ClientType >
const char * tiny_dlna::DLNAMediaServer< ClientType >::getConnectionID ( )
inline

Return the currently configured ConnectionID.

◆ getConnectionMgrDescr()

template<typename ClientType >
DLNADescr & tiny_dlna::DLNAMediaServer< ClientType >::getConnectionMgrDescr ( )
inline

Get pointer to the per-instance ConnectionManager descriptor.

◆ getContentDirectoryDescr()

template<typename ClientType >
DLNADescr & tiny_dlna::DLNAMediaServer< ClientType >::getContentDirectoryDescr ( )
inline

Get pointer to the per-instance ContentDirectory descriptor.

◆ getDeviceType()

const char * tiny_dlna::DLNADeviceInfo::getDeviceType ( )
inlineinherited

◆ getDeviceURL()

Url & tiny_dlna::DLNADeviceInfo::getDeviceURL ( )
inlineinherited

This method returns base url/device.xml.

◆ getFriendlyName()

const char * tiny_dlna::DLNADeviceInfo::getFriendlyName ( )
inlineinherited

◆ getHttpServer()

template<typename ClientType >
IHttpServer * tiny_dlna::DLNAMediaServer< ClientType >::getHttpServer ( )
inline

Provides access to the http server.

◆ getIcon()

Icon tiny_dlna::DLNADeviceInfo::getIcon ( int  idx = 0)
inlineinherited

Provides the item at indix.

◆ getIcons()

Vector< Icon > & tiny_dlna::DLNADeviceInfo::getIcons ( )
inlineinherited

Provides all icons.

◆ getIPAddress()

IPAddress tiny_dlna::DLNADeviceInfo::getIPAddress ( )
inlineinherited

Provides the local IP address.

◆ getIPStr()

const char * tiny_dlna::DLNADeviceInfo::getIPStr ( )
inlineinherited

Provides the local address as string.

◆ getManufacturer()

const char * tiny_dlna::DLNADeviceInfo::getManufacturer ( )
inlineinherited

◆ getManufacturerURL()

const char * tiny_dlna::DLNADeviceInfo::getManufacturerURL ( )
inlineinherited

◆ getMediaServer()

template<typename ClientType >
static DLNAMediaServer * tiny_dlna::DLNAMediaServer< ClientType >::getMediaServer ( IHttpServer server)
inlinestaticprotected

Helper to retrieve DLNAMediaServer instance from HttpServer reference chain.

Navigates through the server's reference (DLNADevice) to get the MediaServer instance.

Parameters
serverPointer to the HttpServer instance
Returns
Pointer to the DLNAMediaServer instance, or nullptr if not found

◆ getModelDescription()

const char * tiny_dlna::DLNADeviceInfo::getModelDescription ( )
inlineinherited

◆ getModelName()

const char * tiny_dlna::DLNADeviceInfo::getModelName ( )
inlineinherited

◆ getModelNumber()

const char * tiny_dlna::DLNADeviceInfo::getModelNumber ( )
inlineinherited

◆ getNS()

const char * tiny_dlna::DLNADeviceInfo::getNS ( )
inlineinherited

◆ getSearchCapabilities()

template<typename ClientType >
const char * tiny_dlna::DLNAMediaServer< ClientType >::getSearchCapabilities ( )
inline

Get the search capabilities string (CSV)

◆ getSerialNumber()

const char * tiny_dlna::DLNADeviceInfo::getSerialNumber ( )
inlineinherited

◆ getService()

DLNAServiceInfo & tiny_dlna::DLNADeviceInfo::getService ( const char *  id)
inlineinherited

Finds a service definition by name.

◆ getServiceByAbbrev()

DLNAServiceInfo & tiny_dlna::DLNADeviceInfo::getServiceByAbbrev ( const char *  abbrev)
inlineinherited

Finds a service definition by name.

◆ getServices()

Vector< DLNAServiceInfo > & tiny_dlna::DLNADeviceInfo::getServices ( )
inlineinherited

Provides all service definitions.

◆ getSinkProtocols()

template<typename ClientType >
const char * tiny_dlna::DLNAMediaServer< ClientType >::getSinkProtocols ( )
inline

Get the current sink ProtocolInfo string.

◆ getSortCapabilities()

template<typename ClientType >
const char * tiny_dlna::DLNAMediaServer< ClientType >::getSortCapabilities ( )
inline

Get the sort capabilities string (CSV)

◆ getSourceProtocols()

template<typename ClientType >
const char * tiny_dlna::DLNAMediaServer< ClientType >::getSourceProtocols ( )
inline

Get the current source ProtocolInfo string.

◆ getSystemUpdateID()

template<typename ClientType >
int tiny_dlna::DLNAMediaServer< ClientType >::getSystemUpdateID ( )
inline

Provides access to the system update ID.

◆ getUDN()

const char * tiny_dlna::DLNADeviceInfo::getUDN ( )
inlineinherited

Provide the udn uuid.

◆ getUniversalProductCode()

const char * tiny_dlna::DLNADeviceInfo::getUniversalProductCode ( )
inlineinherited

◆ getUri()

template<typename ClientType >
Str tiny_dlna::DLNAMediaServer< ClientType >::getUri ( const char *  path)
inlineprotected

Complete Uri.

◆ incrementSystemUpdateID()

template<typename ClientType >
int tiny_dlna::DLNAMediaServer< ClientType >::incrementSystemUpdateID ( )
inline

Call this method if content has changed : Increments and returns the SystemUpdateID

◆ isSubscriptionActive()

bool tiny_dlna::DLNADeviceInfo::isSubscriptionActive ( )
inlineinherited

◆ isSubscriptionsActive()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::isSubscriptionsActive ( )
inline

Query whether subscription notifications are active.

◆ logStatus()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::logStatus ( )
inline

Log current status of subscriptions and scheduler.

◆ loop() [1/2]

virtual bool tiny_dlna::DLNADeviceInfo::loop ( )
inlinevirtualinherited

loop processing

◆ loop() [2/2]

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::loop ( int  loopAction = RUN_ALL)
inline

call this method in the Arduino loop as often as possible

◆ operator bool()

tiny_dlna::DLNADeviceInfo::operator bool ( )
inlineinherited

return true if active

◆ parseContentQueryType()

template<typename ClientType >
ContentQueryType tiny_dlna::DLNAMediaServer< ClientType >::parseContentQueryType ( const char *  flag)
inlineprotected

Common helper to stream a ContentDirectory response (Browse or Search)

◆ print()

size_t tiny_dlna::DLNADeviceInfo::print ( Print &  out,
void *  ref = nullptr 
)
inlineinherited

renders the device xml into the provided Print output.

Parameters
outPrint target
refoptional context pointer (passed through to callbacks)

◆ printDevice()

size_t tiny_dlna::DLNADeviceInfo::printDevice ( Print &  out,
void *  ref 
)
inlineprotectedinherited

◆ printIconDlnaInfo()

size_t tiny_dlna::DLNADeviceInfo::printIconDlnaInfo ( Print &  out,
Icon icon 
)
inlineprotectedinherited

◆ printIconList()

size_t tiny_dlna::DLNADeviceInfo::printIconList ( Print &  out,
void *  ref 
)
inlineprotectedinherited

◆ printRoot()

size_t tiny_dlna::DLNADeviceInfo::printRoot ( Print &  out,
void *  ref 
)
inlineprotectedinherited

◆ printService()

size_t tiny_dlna::DLNADeviceInfo::printService ( Print &  out,
void *  srv 
)
inlineprotectedinherited

◆ printServiceList()

size_t tiny_dlna::DLNADeviceInfo::printServiceList ( Print &  out,
void *  ref 
)
inlineprotectedinherited

◆ printSpecVersion()

size_t tiny_dlna::DLNADeviceInfo::printSpecVersion ( Print &  out,
void *  ref 
)
inlineprotectedinherited

◆ processAction()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processAction ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Process action requests using rules-based dispatch.

◆ processActionBrowse()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionBrowse ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ContentDirectory:Browse action.

◆ processActionGetCurrentConnectionIDs()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionGetCurrentConnectionIDs ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ConnectionManager:GetCurrentConnectionIDs action.

◆ processActionGetCurrentConnectionInfo()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionGetCurrentConnectionInfo ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ConnectionManager:GetCurrentConnectionInfo action.

◆ processActionGetProtocolInfo()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionGetProtocolInfo ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Replies with Source and Sink protocol lists (CSV protocolInfo strings)

◆ processActionGetSearchCapabilities()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionGetSearchCapabilities ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ContentDirectory:GetSearchCapabilities action.

◆ processActionGetSortCapabilities()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionGetSortCapabilities ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ContentDirectory:GetSortCapabilities action.

◆ processActionGetSystemUpdateID()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionGetSystemUpdateID ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ContentDirectory:GetSystemUpdateID action.

◆ processActionSearch()

template<typename ClientType >
bool tiny_dlna::DLNAMediaServer< ClientType >::processActionSearch ( ActionRequest action,
IHttpServer server,
IClientHandler client 
)
inlineprotected

Handle ContentDirectory:Search action.

◆ publishAVT()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::publishAVT ( )
inlineprotected

Publish a ContentDirectory event (SystemUpdateID)

◆ publishCMS()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::publishCMS ( )
inlineprotected

Publish a ConnectionManager event (CurrentConnectionIDs)

◆ setActive()

void tiny_dlna::DLNADeviceInfo::setActive ( bool  flag)
inlineinherited

Sets the server to inactive.

◆ setBaseURL() [1/2]

void tiny_dlna::DLNADeviceInfo::setBaseURL ( const char *  url)
inlineinherited

Defines the base url.

◆ setBaseURL() [2/2]

void tiny_dlna::DLNADeviceInfo::setBaseURL ( IPAddress  ip,
int  port,
const char *  path = nullptr 
)
inlineinherited

Defines the base URL.

◆ setConnectionID()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setConnectionID ( const char *  id)
inline

Set the active ConnectionID for the connection manager.

◆ setConnectionMgrDescr()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setConnectionMgrDescr ( DLNADescr d)
inline

Set a custom ConnectionManager SCPD descriptor (per-instance)

◆ setContentDirectoryDescr()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setContentDirectoryDescr ( DLNADescr d)
inline

Set a custom ContentDirectory SCPD descriptor (per-instance)

◆ setCustomActionRule()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setCustomActionRule ( const char *  suffix,
bool(*)(IClientHandler *, DLNAMediaServer< ClientType > *, ActionRequest &, IHttpServer &)  handler 
)
inline

Define your own custom logic.

◆ setDeviceType()

void tiny_dlna::DLNADeviceInfo::setDeviceType ( const char *  st)
inlineinherited

◆ setFriendlyName()

void tiny_dlna::DLNADeviceInfo::setFriendlyName ( const char *  name)
inlineinherited

◆ setGetDataCallback() [1/2]

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setGetDataCallback ( GetDataCallback  cb)
inline

Sets the data callback that provides a MediaItem by index.

◆ setGetDataCallback() [2/2]

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setGetDataCallback ( GetDataCallbackPrint  cb)
inline

Sets the alternative data callback that prints a DIDL entry directly.

◆ setHttpServer()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setHttpServer ( IHttpServer server)
inline

Set the http server instance the MediaServer should use.

◆ setIPAddress()

void tiny_dlna::DLNADeviceInfo::setIPAddress ( IPAddress  address)
inlineinherited

Defines the local IP address.

◆ setManufacturer()

void tiny_dlna::DLNADeviceInfo::setManufacturer ( const char *  man)
inlineinherited

◆ setManufacturerURL()

void tiny_dlna::DLNADeviceInfo::setManufacturerURL ( const char *  url)
inlineinherited

◆ setModelDescription()

void tiny_dlna::DLNADeviceInfo::setModelDescription ( const char *  descr)
inlineinherited

◆ setModelName()

void tiny_dlna::DLNADeviceInfo::setModelName ( const char *  name)
inlineinherited

◆ setModelNumber()

void tiny_dlna::DLNADeviceInfo::setModelNumber ( const char *  number)
inlineinherited

◆ setNS()

void tiny_dlna::DLNADeviceInfo::setNS ( const char *  ns)
inlineinherited

◆ setPrepareDataCallback()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setPrepareDataCallback ( PrepareDataCallback  cb)
inline

Sets the callback that prepares the data for the Browse and Search.

◆ setProtocols()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setProtocols ( const char *  source,
const char *  sink = "" 
)
inline

Define the source protocol info: use csv Default is http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_50_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_60_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_AC3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_HD_NA_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AC3,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_CIF15_AAC_520,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_CIF30_AAC_940,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L31_HD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L32_HD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L3L_SD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_HP_HD_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_1080i_AAC,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_720p_AAC,http-get:*:video/mp4:DLNA.ORG_PN=MPEG4_P2_MP4_ASP_AAC,http-get:*:video/mp4:DLNA.ORG_PN=MPEG4_P2_MP4_SP_VGA_AAC,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AC3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AC3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPLL_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_MP3,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMALSL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMALSL_MULT5,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320,http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM,http-get:*:image/jpeg:*,http-get:*:video/avi:*,http-get:*:video/divx:*,http-get:*:video/x-matroska:*,http-get:*:video/mpeg:*,http-get:*:video/mp4:*,http-get:*:video/x-ms-wmv:*,http-get:*:video/x-msvideo:*,http-get:*:video/x-flv:*,http-get:*:video/x-tivo-mpeg:*,http-get:*:video/quicktime:*,http-get:*:audio/mp4:*,http-get:*:audio/x-wav:*,http-get:*:audio/x-flac:*,http-get:*:audio/x-dsd:*,http-get:*:application/ogg:http-get::application/vnd.rn-realmedia:http-get::application/vnd.rn-realmedia-vbr:http-get::video/webm:*.

◆ setReference()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setReference ( void *  ref)
inline

Sets a user reference pointer, available in callbacks.

◆ setSearchCapabilities()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setSearchCapabilities ( const char *  caps)
inline

Define the search capabilities: use csv.

◆ setSerialNumber()

void tiny_dlna::DLNADeviceInfo::setSerialNumber ( const char *  sn)
inlineinherited

◆ setSortCapabilities()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setSortCapabilities ( const char *  caps)
inline

Define the sort capabilities: use csv.

◆ setSubscriptionActive()

void tiny_dlna::DLNADeviceInfo::setSubscriptionActive ( bool  flag)
inlineinherited

◆ setSubscriptionsActive()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setSubscriptionsActive ( bool  flag)
inline

Enable/disable subscription notifications.

◆ setUDN()

void tiny_dlna::DLNADeviceInfo::setUDN ( const char *  id)
inlineinherited

Define the udn uuid.

◆ setUdpService()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setUdpService ( IUDPService udp)
inline

Set the UDP service instance the MediaServer should use.

◆ setUniversalProductCode()

void tiny_dlna::DLNADeviceInfo::setUniversalProductCode ( const char *  upc)
inlineinherited

◆ setupConnectionManagerService()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setupConnectionManagerService ( IHttpServer server)
inlineprotected

Setup and register ConnectionManager service.

◆ setupContentDirectoryService()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setupContentDirectoryService ( IHttpServer server)
inlineprotected

Setup and register ContentDirectory service.

◆ setupRules()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setupRules ( )
inlineprotected

Setup the action rules for supported ContentDirectory and ConnectionManager commands

◆ setupServices()

virtual void tiny_dlna::DLNADeviceInfo::setupServices ( IHttpServer server,
IUDPService udp 
)
inlineprotectedvirtualinherited

to be implemented by subclasses

◆ setupServicesImpl()

template<typename ClientType >
void tiny_dlna::DLNAMediaServer< ClientType >::setupServicesImpl ( IHttpServer server)
inlineprotected

Setup the service endpoints.

◆ soapEnvelopeEnd()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::soapEnvelopeEnd ( Print &  out)
inlineprotected

◆ soapEnvelopeStart()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::soapEnvelopeStart ( Print &  out)
inlineprotected

◆ streamActionItems()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::streamActionItems ( Print &  out,
const char *  responseName,
int  startingIndex 
)
inlineprotected

◆ streamDIDL()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::streamDIDL ( Print &  out,
int  numberReturned,
int  startingIndex 
)
inlineprotected

Stream DIDL-Lite payload for a Browse/Search result.

◆ streamDIDLItem()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::streamDIDLItem ( Print &  out,
const MediaItem item 
)
inlineprotected

◆ streamDIDLItems()

template<typename ClientType >
size_t tiny_dlna::DLNAMediaServer< ClientType >::streamDIDLItems ( Print &  out,
int  numberReturned,
int  startingIndex 
)
inlineprotected

◆ toStr()

template<typename ClientType >
const char * tiny_dlna::DLNAMediaServer< ClientType >::toStr ( MediaItemClass  itemClass)
inlineprotected

convert MediaItemClass to UPnP class string

Member Data Documentation

◆ base_url

Str tiny_dlna::DLNADeviceInfo::base_url = "http://localhost:9876/dlna"
protectedinherited

◆ connectionID

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::connectionID = "0"
protected

◆ default_connectionMgrDescr

template<typename ClientType >
DLNAMediaServerConnectionMgrDescr tiny_dlna::DLNAMediaServer< ClientType >::default_connectionMgrDescr
protected

◆ default_contentDirectoryDescr

template<typename ClientType >
DLNAMediaServerContentDirectoryDescr tiny_dlna::DLNAMediaServer< ClientType >::default_contentDirectoryDescr
protected

◆ device_type

Str tiny_dlna::DLNADeviceInfo::device_type
protectedinherited

◆ device_url

Url tiny_dlna::DLNADeviceInfo::device_url
protectedinherited

◆ dlna_device

template<typename ClientType >
DeviceType tiny_dlna::DLNAMediaServer< ClientType >::dlna_device
protected

◆ friendly_name

Str tiny_dlna::DLNADeviceInfo::friendly_name
protectedinherited

◆ g_search_capabiities

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::g_search_capabiities
protected
Initial value:
=
"dc:title,dc:creator,upnp:class,upnp:genre,"
"upnp:album,upnp:artist,upnp:albumArtURI"

◆ g_sort_capabilities

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::g_sort_capabilities
protected
Initial value:
=
"dc:title,dc:date,upnp:class,upnp:album,upnp:episodeNumber,upnp:"
"originalTrackNumber"

◆ g_stream_get_data_cb

template<typename ClientType >
GetDataCallback tiny_dlna::DLNAMediaServer< ClientType >::g_stream_get_data_cb = nullptr
protected

◆ g_stream_numberReturned

template<typename ClientType >
int tiny_dlna::DLNAMediaServer< ClientType >::g_stream_numberReturned = 0
protected

◆ g_stream_reference

template<typename ClientType >
void* tiny_dlna::DLNAMediaServer< ClientType >::g_stream_reference = nullptr
protected

◆ g_stream_startingIndex

template<typename ClientType >
int tiny_dlna::DLNAMediaServer< ClientType >::g_stream_startingIndex = 0
protected

◆ g_stream_totalMatches

template<typename ClientType >
int tiny_dlna::DLNAMediaServer< ClientType >::g_stream_totalMatches = 0
protected

◆ g_stream_updateID

template<typename ClientType >
int tiny_dlna::DLNAMediaServer< ClientType >::g_stream_updateID = 1
protected

◆ get_data_cb

template<typename ClientType >
GetDataCallback tiny_dlna::DLNAMediaServer< ClientType >::get_data_cb = nullptr
protected

◆ get_data_print_cb

template<typename ClientType >
GetDataCallbackPrint tiny_dlna::DLNAMediaServer< ClientType >::get_data_print_cb = nullptr
protected

◆ icons

Vector<Icon> tiny_dlna::DLNADeviceInfo::icons
protectedinherited

◆ is_active

bool tiny_dlna::DLNADeviceInfo::is_active = false
protectedinherited

◆ is_subcription_active

bool tiny_dlna::DLNADeviceInfo::is_subcription_active = false
protectedinherited

◆ localhost

IPAddress tiny_dlna::DLNADeviceInfo::localhost
protectedinherited

◆ manufacturer

Str tiny_dlna::DLNADeviceInfo::manufacturer
protectedinherited

◆ manufacturer_url

Str tiny_dlna::DLNADeviceInfo::manufacturer_url
protectedinherited

◆ model_description

Str tiny_dlna::DLNADeviceInfo::model_description
protectedinherited

◆ model_name

Str tiny_dlna::DLNADeviceInfo::model_name
protectedinherited

◆ model_number

Str tiny_dlna::DLNADeviceInfo::model_number
protectedinherited

◆ model_url

Str tiny_dlna::DLNADeviceInfo::model_url
protectedinherited

◆ ns

Str tiny_dlna::DLNADeviceInfo::ns = "xmlns=\"urn:schemas-upnp-org:device-1-0\""
protectedinherited

◆ p_connmgrDescr

template<typename ClientType >
DLNADescr* tiny_dlna::DLNAMediaServer< ClientType >::p_connmgrDescr = &default_connectionMgrDescr
protected

◆ p_contentDirectoryDescr

template<typename ClientType >
DLNADescr* tiny_dlna::DLNAMediaServer< ClientType >::p_contentDirectoryDescr = &default_contentDirectoryDescr
protected

◆ p_server

template<typename ClientType >
IHttpServer* tiny_dlna::DLNAMediaServer< ClientType >::p_server = nullptr
protected

◆ p_udp_member

template<typename ClientType >
IUDPService* tiny_dlna::DLNAMediaServer< ClientType >::p_udp_member = nullptr
protected

◆ prepare_data_cb

template<typename ClientType >
PrepareDataCallback tiny_dlna::DLNAMediaServer< ClientType >::prepare_data_cb = nullptr
protected

◆ reference_

template<typename ClientType >
void* tiny_dlna::DLNAMediaServer< ClientType >::reference_ = nullptr
protected

◆ rules

template<typename ClientType >
Vector<ActionRule> tiny_dlna::DLNAMediaServer< ClientType >::rules
protected

◆ serial_number

Str tiny_dlna::DLNADeviceInfo::serial_number
protectedinherited

◆ services

Vector<DLNAServiceInfo> tiny_dlna::DLNADeviceInfo::services
protectedinherited

◆ sinkProto

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::sinkProto = ""
protected

◆ sourceProto

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::sourceProto = DLNA_PROTOCOL_AUDIO
protected

◆ st

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::st = "urn:schemas-upnp-org:device:MediaServer:1"
protected

◆ udn

Str tiny_dlna::DLNADeviceInfo::udn = "uuid:09349455-2941-4cf7-9847-0dd5ab210e97"
protectedinherited

◆ universal_product_code

Str tiny_dlna::DLNADeviceInfo::universal_product_code
protectedinherited

◆ url_str

Str tiny_dlna::DLNADeviceInfo::url_str
protectedinherited

◆ usn

template<typename ClientType >
const char* tiny_dlna::DLNAMediaServer< ClientType >::usn = "uuid:media-server-0000-0000-0000-000000000001"
protected

◆ version_major

int tiny_dlna::DLNADeviceInfo::version_major = 1
protectedinherited

◆ version_minor

int tiny_dlna::DLNADeviceInfo::version_minor = 0
protectedinherited

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