Arduino DLNA Server
HttpStreamedOutput.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "WiFi.h"
4 
5 namespace tiny_dlna {
6 
13  public:
14  // provides the mime type
15  virtual const char* mime() = 0;
16 
17  // checks if the client is valid
18  virtual bool isValid(WiFiClient& client) = 0;
19 
20  // content that is written when the request is opened
21  virtual void open(WiFiClient& client) = 0;
22 
23  // checks if we have any open clients
24  virtual bool isOpen() = 0;
25 
26  // end processing by wr
27  virtual void close() = 0;
28 
29  // write the content to the HttpStreamedMultiOutput
30  virtual size_t write(uint8_t* content, int len) = 0;
31 
32  // writes a line
33  virtual size_t print(const char* str) = 0;
34 
35  // writes a line which terminates with a html line break
36  virtual size_t println(const char* str) = 0;
37 
38  // release memory
39  virtual void cleanup() = 0;
40 
41  // actually we do nothing here - but some subclasses might
42  virtual void doLoop() = 0;
43 };
44 
45 } // namespace tiny_dlna
Abstract class for handling streamed output.
Definition: HttpStreamedOutput.h:12
virtual size_t println(const char *str)=0
virtual size_t write(uint8_t *content, int len)=0
virtual bool isValid(WiFiClient &client)=0
virtual const char * mime()=0
virtual size_t print(const char *str)=0
virtual void open(WiFiClient &client)=0
Definition: Allocator.h:6