Arduino DLNA Server
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Variables
tiny_dlna Namespace Reference

Classes

class  ActionReply
 Represents the result of invoking a DLNA service Action. More...
 
class  ActionRequest
 Represents a request to invoke a remote DLNA service action. More...
 
class  AllocatorPSRAM
 Custom allocator that uses ESP32's PSRAM for memory allocation. More...
 
class  Argument
 DLNA Service: Action Argument. More...
 
class  ChunkPrint
 Print implementation for HTTP chunked transfer encoding. More...
 
class  DLNAControlPoint
 Lightweight DLNA control point manager. More...
 
class  DLNAControlPointMediaRenderer
 Class to control a MediaRenderer device from a control point. More...
 
class  DLNAControlPointMediaServer
 Helper class to control/query a MediaServer from a control point. More...
 
class  DLNAControlPointRequestParser
 Translates DLNA UDP Requests to Schedule so that we can schedule a reply. More...
 
class  DLNADescr
 Abstract DLNA Descriptor Generation. More...
 
class  DLNADevice
 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...
 
class  DLNADeviceInfo
 Device Attributes and generation of XML using urn:schemas-upnp-org:device-1-0. We could just return a predefined device xml document, but we provide a dynamic generation of the service xml which should be more memory efficient. Strings are represented as char*, so you can assign values that are stored in ProgMem to minimize the RAM usage. If you need to keep the values on the heap you can use addString() method. More...
 
class  DLNADeviceRequestParser
 Translates DLNA UDP Requests to Schedule so that we can schedule a reply. More...
 
class  DLNAMediaRenderer
 MediaRenderer DLNA Device. More...
 
class  DLNAMediaRendererConnectionMgrDescr
 ConnectionManager service descriptor (SCPD) generator. More...
 
class  DLNAMediaRendererControlDescr
 RenderingControl service descriptor (SCPD) generator. More...
 
class  DLNAMediaRendererTransportDescr
 AVTransport service descriptor (SCPD) generator. More...
 
class  DLNAMediaServer
 Digital Media Server implementation. More...
 
class  DLNAMediaServerConnectionMgrDescr
 ConnectionManager SCPD descriptor for MediaServer. More...
 
class  DLNAMediaServerContentDirectoryDescr
 ContentDirectory SCPD descriptor for MediaServer. More...
 
class  DLNAServiceInfo
 Attributes needed for the DLNA Service Definition. More...
 
struct  EscapingPrint
 Print wrapper that escapes & < > " ' while forwarding to an underlying Print. Returns the expanded output length (not input bytes consumed). More...
 
class  HttpChunkReader
 Http might reply with chunks. So we need to dechunk the data. see https://en.wikipedia.org/wiki/Chunked_transfer_encoding. More...
 
class  HttpChunkWriter
 Writes the data chunked to the actual client. More...
 
class  HttpHeader
 In a http request and reply we need to process header Debugrmation. With this API we can define and query the header Information. The individual header lines are stored in a list. This is the common functionality for the HttpRequest and HttpReplyHeader subclasses. More...
 
struct  HttpHeaderLine
 A individual key - value header line. More...
 
class  HttpLineReader
 We read a single line. A terminating 0 is added to the string to make it compliant for c string functions. More...
 
class  HttpParameters
 API for http parameters: key=value&key1=value1. More...
 
class  HttpReplyHeader
 Reading and Writing of Http Replys. More...
 
class  HttpRequest
 Simple API to process get, put, post, del http requests I tried to use Arduino HttpClient, but I did not manage to extract the mime type from streaming get requests. More...
 
class  HttpRequestHandlerLine
 Used to register and process callbacks. More...
 
class  HttpRequestHeader
 Reading and writing of Http Requests. More...
 
class  HttpRequestRewrite
 Object which information about the rewrite rule. More...
 
class  HttpServer
 Header-only HTTP server wrapper that registers callback handlers. More...
 
class  HttpStreamCopy
 Processing of a single stream to a single client. In the loop we can simply provide individual small chunks until we are done. More...
 
class  HttpStreamedOutput
 Abstract class for handling streamed output. More...
 
class  Icon
 Information about the icon. More...
 
class  IControlPoint
 Abstract interface for DLNA Control Point functionality. More...
 
class  IDevice
 Abstract interface for DLNA device functionality. More...
 
class  IHttpRequest
 Abstract interface for HTTP client request functionality. More...
 
class  IHttpServer
 Abstract interface for HTTP server functionality. More...
 
struct  IPAddressAndPort
 IP Adress including Port information. More...
 
class  ISubscriptionMgrDevice
 Abstract interface for UPnP event subscription management. More...
 
class  IUDPService
 Abstract Interface for UDP API. More...
 
class  List
 Double linked list. More...
 
class  LoggerClass
 Logger that writes messages dependent on the log level. More...
 
struct  MediaItem
 Media item description used to build DIDL-Lite entries. More...
 
struct  MimeExtension
 Mapping from file extensions to mime types. More...
 
class  MSearchReplyCP
 Processing at control point to handle a MSearchReply from the device. More...
 
class  MSearchReplySchedule
 Answer from device to MSearch request by sending a reply. More...
 
class  MSearchSchedule
 Send MSearch request. More...
 
class  NotifyReplyCP
 Represents a notification/notify reply scheduled for control-point processing. More...
 
class  NullPrint
 Class with does not do any output: it can be used to determine the length of the output. More...
 
struct  PendingNotification
 Representation of a queued notification to be delivered later. More...
 
class  PostAliveSchedule
 Send out PostAlive messages: Repeated every 5 seconds. More...
 
class  PostByeSchedule
 Send out ByeBye message. More...
 
class  PostSubscribe
 Send SUBSCRIBE message via UDP unicast. More...
 
class  Printf
 Printf support with output to Print. This class does not do any heap allocations! More...
 
class  Queue
 FIFO Queue which is based on a List. More...
 
class  QueueLockFree
 A simple single producer, single consumer lock free queue. More...
 
struct  RequestData
 Provides information of the received UDP which consists of the (xml) data and the peer address and port. More...
 
class  RingBuffer
 Implementation of a Simple Circular Buffer. Instead of comparing the position of the read and write pointer in order to figure out if we still have characters available or space left to write we keep track of the actual length which is easier to follow. More...
 
struct  Schedule
 An individual Schedule (to send out UDP messages) More...
 
class  Scheduler
 Scheduler which processes all due Schedules (to send out UDP replies) More...
 
class  SdFatContentProvider
 Content provider for DLNA media server using SdFat filesystem. More...
 
class  SdFatDirectoryTree
 Simple in-memory directory tree built using SdFat recursive directory listing. More...
 
struct  SdFatFileInfo
 Describes an entry from a parsed SdFat directory listing. More...
 
class  SdFatParser
 Simple character-by-character parser that emits SdFatFileInfo via a callback. More...
 
class  Str
 Heap-backed string utility used throughout tiny_dlna. More...
 
class  StrPrint
 Print to a dynamic string. More...
 
class  StrView
 A simple wrapper to provide string functions on char*. If the underlying char* is a const we do not allow any updates; The ownership of the chr* must be managed externally! More...
 
struct  Subscription
 Represents a single event subscription for a service. More...
 
class  SubscriptionMgrControlPoint
 Standalone manager for UPnP/DLNA event subscriptions used by control points and devices. More...
 
class  SubscriptionMgrDevice
 Manages UPnP event subscriptions and queued notifications for a DLNA device. More...
 
class  TreeNode
 Node in the directory tree representing either a file or a directory. More...
 
class  UDPAsyncService
 Access to UDP functionality: sending and receiving of data using the Async API of the ESP32. More...
 
class  UDPService
 Access to UDP functionality: sending and receiving of data. More...
 
class  Url
 URL parser which breaks a full url string up into its individual parts. More...
 
class  Vector
 Lightweight wrapper around std::vector with Arduino-friendly helpers and a pluggable allocator. More...
 
class  XMLAttributeParser
 Small utility to extract attributes from a start-tag in an XML fragment. More...
 
class  XMLDeviceParser
 Incremental XML device parser using XMLParserPrint. More...
 
struct  XMLNode
 Represents a single XML element. More...
 
class  XMLParser
 Lightweight streaming XML parser. More...
 
class  XMLParserPrint
 Helper class that implements a Print interface to accumulate XML data and then parse it using XMLParser. More...
 
struct  XMLPrinter
 Functions to efficiently output XML. XML data contains a lot of redundancy so it is more memory efficient to generate the data instead of using a predefined XML document. More...
 
class  XMLProtocolInfoParser
 Streaming parser for ConnectionManager::GetProtocolInfo results. More...
 

Typedefs

using stringPSRAM = std::basic_string< char, std::char_traits< char >, AllocatorPSRAM< char > >
 
using XMLCallback = std::function< void(Client &client, ActionReply &reply)>
 
typedef void(* http_callback) (IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 
using WiFiHttpServer = HttpServer< WiFiClient, WiFiServer >
 
using web_callback_fn = void(*)(IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *handlerLine)
 

Enumerations

enum class  DlnaLogLevel { Debug , Info , Warning , Error }
 Supported log levels. More...
 
enum  LoopAction { RUN_SERVER = 1 , RUN_UDP = 2 , RUN_SUBSCRIPTIONS = 4 , RUN_ALL = 7 }
 Loop Action flag. More...
 
enum class  MediaEvent {
  SET_URI , PLAY , PAUSE , STOP ,
  SET_VOLUME , SET_MUTE
}
 Events emitted by the MediaRenderer to notify the application will receive the event along with a reference to the emitting MediaRenderer instance. The handler should query the renderer (for example getCurrentUri(), getVolume(), getMime()) to determine the appropriate action for each event. More...
 
enum class  MediaItemClass {
  Unknown , Folder , Music , Radio ,
  Video , Photo
}
 
enum class  SubscriptionState { Unsubscribed , Subscribing , Subscribed , Unsubscribing }
 Subscription State for DLNA eventing. More...
 
enum class  ProtocolRole { IsSource = 0 , IsSink = 1 }
 Role to indicate whether a protocolInfo entry is a Source or a Sink. More...
 
enum class  ContentQueryType { Search , BrowseMetadata , BrowseChildren }
 Type of content query for DLNA browsing/searching. More...
 
enum  TinyMethodID {
  T_UNDEFINED , T_GET , T_HEAD , T_POST ,
  T_PUT , T_DELETE , T_TRACE , T_OPTIONS ,
  T_CONNECT , T_PATCH , T_UNSUBSCRIBE , T_SUBSCRIBE ,
  T_NOTIFY
}
 

Variables

DLNAControlPointselfDLNAControlPoint = nullptr
 
const int MaxHeaderLineLength = 200
 
const char * CONTENT_TYPE = "Content-Type"
 
const char * CONTENT_LENGTH = "Content-Length"
 
const char * CONNECTION = "Connection"
 
const char * CON_CLOSE = "close"
 
const char * CON_KEEP_ALIVE = "keep-alive"
 
const char * TRANSFER_ENCODING = "Transfer-Encoding"
 
const char * CHUNKED = "chunked"
 
const char * ACCEPT = "Accept"
 
const char * ACCEPT_ALL = "*/*"
 
const char * SUCCESS = "Success"
 
const char * USER_AGENT = "User-Agent"
 
const char * DEFAULT_AGENT
 
const char * HOST_C = "Host"
 
const char * ACCEPT_ENCODING = "Accept-Encoding"
 
const char * IDENTITY = "identity"
 
const char * LOCATION = "Location"
 
const char * methods []
 

Typedef Documentation

◆ http_callback

typedef void(* tiny_dlna::http_callback) (IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)

◆ stringPSRAM

using tiny_dlna::stringPSRAM = typedef std::basic_string<char, std::char_traits<char>, AllocatorPSRAM<char> >

◆ web_callback_fn

using tiny_dlna::web_callback_fn = typedef void (*)(IHttpServer* server, const char* requestPath, HttpRequestHandlerLine* handlerLine)

◆ WiFiHttpServer

using tiny_dlna::WiFiHttpServer = typedef HttpServer<WiFiClient, WiFiServer>

◆ XMLCallback

using tiny_dlna::XMLCallback = typedef std::function<void(Client& client, ActionReply& reply)>

Enumeration Type Documentation

◆ ContentQueryType

enum class tiny_dlna::ContentQueryType
strong

Type of content query for DLNA browsing/searching.

Used to specify the type of query performed on DLNA content directories.

Enumerator
Search 

Search for content

BrowseMetadata 

Browse metadata of a content item

BrowseChildren 

Browse children of a container

◆ DlnaLogLevel

enum class tiny_dlna::DlnaLogLevel
strong

Supported log levels.

Enumerator
Debug 
Info 
Warning 
Error 

◆ LoopAction

Loop Action flag.

Enumerator
RUN_SERVER 
RUN_UDP 
RUN_SUBSCRIPTIONS 
RUN_ALL 

◆ MediaEvent

enum class tiny_dlna::MediaEvent
strong

Events emitted by the MediaRenderer to notify the application will receive the event along with a reference to the emitting MediaRenderer instance. The handler should query the renderer (for example getCurrentUri(), getVolume(), getMime()) to determine the appropriate action for each event.

Events:

  • SET_URI: The renderer received a new URI (use getCurrentUri()).
  • PLAY: Start or resume playback of the current URI.
  • PAUSE: Pause playback.
  • STOP: Stop playback and reset playback state.
  • SET_VOLUME: The volume was changed (use getVolume()).
  • SET_MUTE: The mute state changed (use isMuted()).
Enumerator
SET_URI 
PLAY 
PAUSE 
STOP 
SET_VOLUME 
SET_MUTE 

◆ MediaItemClass

enum class tiny_dlna::MediaItemClass
strong
Enumerator
Unknown 
Folder 
Music 
Radio 
Video 
Photo 

◆ ProtocolRole

enum class tiny_dlna::ProtocolRole
strong

Role to indicate whether a protocolInfo entry is a Source or a Sink.

Used to distinguish between source and sink roles in DLNA protocolInfo entries.

Enumerator
IsSource 

Entry is a source

IsSink 

Entry is a sink

◆ SubscriptionState

enum class tiny_dlna::SubscriptionState
strong

Subscription State for DLNA eventing.

Used to track the state of a subscription to a DLNA service event.

Enumerator
Unsubscribed 

Not subscribed to the event

Subscribing 

Currently subscribing to the event

Subscribed 

Successfully subscribed to the event

Unsubscribing 

Currently unsubscribing from the event

◆ TinyMethodID

Enumerator
T_UNDEFINED 
T_GET 
T_HEAD 
T_POST 
T_PUT 
T_DELETE 
T_TRACE 
T_OPTIONS 
T_CONNECT 
T_PATCH 
T_UNSUBSCRIBE 
T_SUBSCRIBE 
T_NOTIFY 

Variable Documentation

◆ ACCEPT

const char* tiny_dlna::ACCEPT = "Accept"

◆ ACCEPT_ALL

const char* tiny_dlna::ACCEPT_ALL = "*/*"

◆ ACCEPT_ENCODING

const char* tiny_dlna::ACCEPT_ENCODING = "Accept-Encoding"

◆ CHUNKED

const char* tiny_dlna::CHUNKED = "chunked"

◆ CON_CLOSE

const char* tiny_dlna::CON_CLOSE = "close"

◆ CON_KEEP_ALIVE

const char* tiny_dlna::CON_KEEP_ALIVE = "keep-alive"

◆ CONNECTION

const char* tiny_dlna::CONNECTION = "Connection"

◆ CONTENT_LENGTH

const char* tiny_dlna::CONTENT_LENGTH = "Content-Length"

◆ CONTENT_TYPE

const char* tiny_dlna::CONTENT_TYPE = "Content-Type"

◆ DEFAULT_AGENT

const char* tiny_dlna::DEFAULT_AGENT
Initial value:
=
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

◆ HOST_C

const char* tiny_dlna::HOST_C = "Host"

◆ IDENTITY

const char* tiny_dlna::IDENTITY = "identity"

◆ LOCATION

const char* tiny_dlna::LOCATION = "Location"

◆ MaxHeaderLineLength

const int tiny_dlna::MaxHeaderLineLength = 200

◆ methods

const char* tiny_dlna::methods[]
Initial value:
= {"?", "GET", "HEAD", "POST",
"PUT", "DELETE", "TRACE", "OPTIONS",
"CONNECT", "PATCH", "UNSUBSCRIBE", "SUBSCRIBE", "NOTIFY", nullptr}

◆ selfDLNAControlPoint

DLNAControlPoint* tiny_dlna::selfDLNAControlPoint = nullptr

◆ SUCCESS

const char* tiny_dlna::SUCCESS = "Success"

◆ TRANSFER_ENCODING

const char* tiny_dlna::TRANSFER_ENCODING = "Transfer-Encoding"

◆ USER_AGENT

const char* tiny_dlna::USER_AGENT = "User-Agent"