mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-25 00:26:54 +01:00
Refactored start / end of HTML into functions
This commit is contained in:
@@ -7,11 +7,10 @@ extern const char httpMimeTypeHTML[]; // HTML MIME type
|
||||
extern const char httpMimeTypeText[]; // TEXT MIME type
|
||||
extern const char httpMimeTypeJson[];
|
||||
extern const char httpMimeTypeBinary[];
|
||||
extern const char htmlHeader[];
|
||||
extern const char htmlEnd[];
|
||||
extern const char htmlReturnToMenu[];
|
||||
extern const char htmlRefresh[];
|
||||
extern const char htmlReturnToCfg[];
|
||||
|
||||
extern const char htmlFooterReturnToMenu[];
|
||||
extern const char htmlFooterRefreshLink[];
|
||||
extern const char htmlFooterReturnToCfgLink[];
|
||||
|
||||
extern const char *htmlPinRoleNames[];
|
||||
|
||||
@@ -21,8 +20,6 @@ extern const char *g_build_str;
|
||||
#define HTTP_RESPONSE_NOT_FOUND 404
|
||||
#define HTTP_RESPONSE_SERVER_ERROR 500
|
||||
|
||||
|
||||
|
||||
#define MAX_QUERY 16
|
||||
#define MAX_HEADERS 16
|
||||
typedef struct http_request_tag {
|
||||
@@ -53,11 +50,13 @@ typedef struct http_request_tag {
|
||||
|
||||
int HTTP_ProcessPacket(http_request_t *request);
|
||||
void http_setup(http_request_t *request, const char *type);
|
||||
void http_html_start(http_request_t *request, const char *pagename);
|
||||
void http_html_end(http_request_t *request);
|
||||
int poststr(http_request_t *request, const char *str);
|
||||
int postany(http_request_t *request, const char *str, int len);
|
||||
void misc_formatUpTimeString(int totalSeconds, char *o);
|
||||
void HTTP_AddBuildFooter(http_request_t *request);
|
||||
void HTTP_AddHeader(http_request_t *request);
|
||||
// void HTTP_AddBuildFooter(http_request_t *request);
|
||||
// void HTTP_AddHeader(http_request_t *request);
|
||||
int http_getArg(const char *base, const char *name, char *o, int maxSize);
|
||||
int http_getArgInteger(const char *base, const char *name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user