|
2 | 2 | #define CONTENT_H_ |
3 | 3 |
|
4 | 4 | #include <cstdint> |
5 | | - |
6 | 5 | #include "httpd/httpd.h" |
7 | | - |
8 | 6 | #if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) |
9 | | -# include "dmx.js.h" |
| 7 | +#include "dmx.js.h" |
10 | 8 | #endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */ |
11 | 9 | #if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) |
12 | | -# include "rtc.html.h" |
| 10 | +#include "rtc.html.h" |
13 | 11 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */ |
14 | 12 | #include "static.js.h" |
15 | 13 | #include "styles.css.h" |
16 | 14 | #include "index.js.h" |
17 | 15 | #include "date.js.h" |
18 | 16 | #if defined (NODE_SHOWFILE) |
19 | | -# include "showfile.html.h" |
| 17 | +#include "showfile.html.h" |
20 | 18 | #endif /* (NODE_SHOWFILE) */ |
21 | 19 | #include "default.js.h" |
22 | 20 | #if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) |
23 | | -# include "rtc.js.h" |
| 21 | +#include "rtc.js.h" |
24 | 22 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */ |
25 | 23 | #if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) |
26 | | -# include "rdm.js.h" |
| 24 | +#include "rdm.js.h" |
27 | 25 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */ |
28 | 26 | #if !defined (CONFIG_HTTP_HTML_NO_TIME) |
29 | | -# include "time.js.h" |
| 27 | +#include "time.js.h" |
30 | 28 | #endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */ |
| 29 | +#if !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI)) |
| 30 | +#include "pixeltype.json.h" |
| 31 | +#endif /* !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI)) */ |
31 | 32 | #if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) |
32 | | -# include "rdm.html.h" |
| 33 | +#include "rdm.html.h" |
33 | 34 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */ |
34 | 35 | #include "index.html.h" |
35 | 36 | #if defined (NODE_SHOWFILE) |
36 | | -# include "showfile.js.h" |
| 37 | +#include "showfile.js.h" |
37 | 38 | #endif /* (NODE_SHOWFILE) */ |
38 | 39 | #if !defined (CONFIG_HTTP_HTML_NO_TIME) |
39 | | -# include "time.html.h" |
| 40 | +#include "time.html.h" |
40 | 41 | #endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */ |
41 | 42 | #if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) |
42 | | -# include "dmx.html.h" |
| 43 | +#include "dmx.html.h" |
43 | 44 | #endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */ |
44 | 45 |
|
45 | 46 | struct FilesContent { |
46 | | - const char *pFileName; |
47 | | - const char *pContent; |
48 | | - const uint32_t nContentLength; |
49 | | - const http::contentTypes contentType; |
| 47 | + const char *file_name; |
| 48 | + const char *content; |
| 49 | + uint32_t content_length; |
| 50 | + http::ContentTypes content_type; |
50 | 51 | }; |
51 | 52 |
|
52 | | -static constexpr struct FilesContent HttpContent[] = { |
| 53 | +inline constexpr struct FilesContent kHttpContent[] = { |
53 | 54 | #if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) |
54 | | - { "dmx.js", dmx_js, 1357, static_cast<http::contentTypes>(2) }, |
| 55 | + { "dmx.js", dmx_js, 1357, static_cast<http::ContentTypes>(2) }, |
55 | 56 | #endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */ |
56 | 57 | #if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) |
57 | | - { "rtc.html", rtc_html, 1013, static_cast<http::contentTypes>(0) }, |
| 58 | + { "rtc.html", rtc_html, 1013, static_cast<http::ContentTypes>(0) }, |
58 | 59 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */ |
59 | | - { "static.js", static_js, 1252, static_cast<http::contentTypes>(2) }, |
60 | | - { "styles.css", styles_css, 409, static_cast<http::contentTypes>(1) }, |
61 | | - { "index.js", index_js, 1168, static_cast<http::contentTypes>(2) }, |
62 | | - { "date.js", date_js, 716, static_cast<http::contentTypes>(2) }, |
| 60 | + { "static.js", static_js, 1252, static_cast<http::ContentTypes>(2) }, |
| 61 | + { "styles.css", styles_css, 409, static_cast<http::ContentTypes>(1) }, |
| 62 | + { "index.js", index_js, 1168, static_cast<http::ContentTypes>(2) }, |
| 63 | + { "date.js", date_js, 716, static_cast<http::ContentTypes>(2) }, |
63 | 64 | #if defined (NODE_SHOWFILE) |
64 | | - { "showfile.html", showfile_html, 1386, static_cast<http::contentTypes>(0) }, |
| 65 | + { "showfile.html", showfile_html, 1386, static_cast<http::ContentTypes>(0) }, |
65 | 66 | #endif /* (NODE_SHOWFILE) */ |
66 | | - { "default.js", default_js, 261, static_cast<http::contentTypes>(2) }, |
| 67 | + { "default.js", default_js, 261, static_cast<http::ContentTypes>(2) }, |
67 | 68 | #if !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) |
68 | | - { "rtc.js", rtc_js, 843, static_cast<http::contentTypes>(2) }, |
| 69 | + { "rtc.js", rtc_js, 843, static_cast<http::ContentTypes>(2) }, |
69 | 70 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RTC) && !defined (DISABLE_RTC) */ |
70 | 71 | #if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) |
71 | | - { "rdm.js", rdm_js, 1001, static_cast<http::contentTypes>(2) }, |
| 72 | + { "rdm.js", rdm_js, 1001, static_cast<http::ContentTypes>(2) }, |
72 | 73 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */ |
73 | 74 | #if !defined (CONFIG_HTTP_HTML_NO_TIME) |
74 | | - { "time.js", time_js, 402, static_cast<http::contentTypes>(2) }, |
| 75 | + { "time.js", time_js, 402, static_cast<http::ContentTypes>(2) }, |
75 | 76 | #endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */ |
| 77 | +#if !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI)) |
| 78 | + { "pixeltype.json", pixeltype_json, 1665, static_cast<http::ContentTypes>(3) }, |
| 79 | +#endif /* !defined (CONFIG_HTTP_HTML_NO_PIXEL) && (defined(OUTPUT_DMX_PIXEL) || defined(OUTPUT_DMX_PIXEL_MULTI)) */ |
76 | 80 | #if !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) |
77 | | - { "rdm.html", rdm_html, 1142, static_cast<http::contentTypes>(0) }, |
| 81 | + { "rdm.html", rdm_html, 1142, static_cast<http::ContentTypes>(0) }, |
78 | 82 | #endif /* !defined (CONFIG_HTTP_HTML_NO_RDM) && defined (RDM_CONTROLLER) */ |
79 | | - { "index.html", index_html, 669, static_cast<http::contentTypes>(0) }, |
| 83 | + { "index.html", index_html, 669, static_cast<http::ContentTypes>(0) }, |
80 | 84 | #if defined (NODE_SHOWFILE) |
81 | | - { "showfile.js", showfile_js, 1425, static_cast<http::contentTypes>(2) }, |
| 85 | + { "showfile.js", showfile_js, 1425, static_cast<http::ContentTypes>(2) }, |
82 | 86 | #endif /* (NODE_SHOWFILE) */ |
83 | 87 | #if !defined (CONFIG_HTTP_HTML_NO_TIME) |
84 | | - { "time.html", time_html, 599, static_cast<http::contentTypes>(0) }, |
| 88 | + { "time.html", time_html, 599, static_cast<http::ContentTypes>(0) }, |
85 | 89 | #endif /* !defined (CONFIG_HTTP_HTML_NO_TIME) */ |
86 | 90 | #if !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) |
87 | | - { "dmx.html", dmx_html, 538, static_cast<http::contentTypes>(0) }, |
| 91 | + { "dmx.html", dmx_html, 538, static_cast<http::ContentTypes>(0) }, |
88 | 92 | #endif /* !defined (CONFIG_HTTP_HTML_NO_DMX) && (defined(OUTPUT_DMX_SEND) || defined(OUTPUT_DMX_SEND_MULTI)) */ |
89 | 93 | }; |
90 | 94 |
|
| 95 | + |
91 | 96 | #endif /* CONTENT_H_ */ |
0 commit comments