arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
AudioPlayerProtocolServer Class Reference

Audio Player Protocol Server: We can use the indicated protocol over http to control the audio player provided by the audiotools. More...

#include <AudioPlayerProtocolServer.h>

Inheritance diagram for AudioPlayerProtocolServer:
KARadioProtocolServer

Public Member Functions

 AudioPlayerProtocolServer ()=default
 Empty constructor: call setPlayer to define the player.
 
 AudioPlayerProtocolServer (AudioPlayerProtocol &protocol, AudioPlayer &player, int port=80, const char *ssid=nullptr, const char *pwd=nullptr)
 Default constructor.
 
bool begin ()
 
void copy ()
 
void loop ()
 
void setBufferSize (int size)
 Defines the buffer size that is made available for the http reply.
 
void setPassword (const char *password)
 
void setPlayer (AudioPlayer &player)
 Defines the player.
 
void setPort (int port)
 
void setProtocol (AudioPlayerProtocol &protocol)
 
void setSSID (const char *ssid)
 
void setSSID (const char *ssid, const char *password)
 

Static Protected Member Functions

static void parse (HttpServer *server, const char *requestPath, HttpRequestHandlerLine *hl)
 

Protected Attributes

int buffer_size = 512
 
Vector< void * > context {1}
 
AudioPlayerProtocolp_protocol
 
const charpassword = nullptr
 
int port = 80
 
QueueStream< uint8_tqueueStream {ringBuffer}
 
RingBuffer< uint8_tringBuffer {0}
 
HttpServer server {wifi}
 
const charssid = nullptr
 
WiFiServer wifi
 

Detailed Description

Audio Player Protocol Server: We can use the indicated protocol over http to control the audio player provided by the audiotools.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ AudioPlayerProtocolServer() [1/2]

AudioPlayerProtocolServer ( AudioPlayerProtocol protocol,
AudioPlayer player,
int  port = 80,
const char ssid = nullptr,
const char pwd = nullptr 
)
inline

Default constructor.

◆ AudioPlayerProtocolServer() [2/2]

Empty constructor: call setPlayer to define the player.

Member Function Documentation

◆ begin()

bool begin ( )
inline

◆ copy()

void copy ( )
inline

◆ loop()

void loop ( )
inline

◆ parse()

static void parse ( HttpServer server,
const char requestPath,
HttpRequestHandlerLine hl 
)
inlinestaticprotected

◆ setBufferSize()

void setBufferSize ( int  size)
inline

Defines the buffer size that is made available for the http reply.

◆ setPassword()

void setPassword ( const char password)
inline

◆ setPlayer()

void setPlayer ( AudioPlayer player)
inline

Defines the player.

◆ setPort()

void setPort ( int  port)
inline

◆ setProtocol()

void setProtocol ( AudioPlayerProtocol protocol)
inline

◆ setSSID() [1/2]

void setSSID ( const char ssid)
inline

◆ setSSID() [2/2]

void setSSID ( const char ssid,
const char password 
)
inline

Member Data Documentation

◆ buffer_size

int buffer_size = 512
protected

◆ context

Vector<void*> context {1}
protected

◆ p_protocol

AudioPlayerProtocol* p_protocol
protected

◆ password

const char* password = nullptr
protected

◆ port

int port = 80
protected

◆ queueStream

QueueStream<uint8_t> queueStream {ringBuffer}
protected

◆ ringBuffer

RingBuffer<uint8_t> ringBuffer {0}
protected

◆ server

HttpServer server {wifi}
protected

◆ ssid

const char* ssid = nullptr
protected

◆ wifi

WiFiServer wifi
protected

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