Arduino DLNA Server
Loading...
Searching...
No Matches
HttpRequestHandlerLine.h
Go to the documentation of this file.
1#pragma once
2
3#include "HttpHeader.h"
4#include "IHttpServer.h"
5
6namespace tiny_dlna {
7
13 public:
14 HttpRequestHandlerLine(int ctxSize = 0) {
15 DlnaLogger.log(DlnaLogLevel::Debug, "HttpRequestHandlerLine");
16 contextCount = ctxSize;
17 if (ctxSize > 0) {
18 context = new void*[ctxSize];
19 for (int i = 0; i < ctxSize; i++) {
20 context[i] = nullptr;
21 }
22 }
23 }
24
26 DlnaLogger.log(DlnaLogLevel::Debug, "~HttpRequestHandlerLine");
27 if (contextCount > 0) {
28 DlnaLogger.log(DlnaLogLevel::Debug, "HttpRequestHandlerLine %s", "free");
29 if (contextCount > 0) delete[] context;
30 }
31 }
32
35 const char* mime = nullptr;
37 void** context = nullptr;
38 int contextCount = 0;
39 StrView* header = nullptr;
40};
41
42} // namespace tiny_dlna
Used to register and process callbacks.
Definition: HttpRequestHandlerLine.h:12
StrView * header
Definition: HttpRequestHandlerLine.h:39
web_callback_fn fn
Definition: HttpRequestHandlerLine.h:36
HttpRequestHandlerLine(int ctxSize=0)
Definition: HttpRequestHandlerLine.h:14
Str path
Definition: HttpRequestHandlerLine.h:34
TinyMethodID method
Definition: HttpRequestHandlerLine.h:33
~HttpRequestHandlerLine()
Definition: HttpRequestHandlerLine.h:25
void ** context
Definition: HttpRequestHandlerLine.h:37
const char * mime
Definition: HttpRequestHandlerLine.h:35
int contextCount
Definition: HttpRequestHandlerLine.h:38
A simple wrapper to provide string functions on char*. If the underlying char* is a const we do not a...
Definition: StrView.h:18
Heap-backed string utility used throughout tiny_dlna.
Definition: Str.h:27
Definition: Allocator.h:13
TinyMethodID
Definition: HttpHeader.h:35
void(* web_callback_fn)(IClientHandler &client, IHttpServer *server, const char *requestPath, HttpRequestHandlerLine *handlerLine)
Definition: IHttpServer.h:40