2023-05-26 22:48:20 +08:00
|
|
|
// Copyright (c) 2023 Cesanta Software Limited
|
|
|
|
// All rights reserved
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "mongoose.h"
|
|
|
|
|
|
|
|
#if !defined(HTTP_URL)
|
|
|
|
#define HTTP_URL "http://0.0.0.0:8000"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HTTPS_URL)
|
|
|
|
#define HTTPS_URL "http://0.0.0.0:8443"
|
|
|
|
#endif
|
|
|
|
|
2023-05-29 00:06:47 +08:00
|
|
|
#define MAX_DEVICE_NAME 40
|
2023-06-15 18:11:07 +08:00
|
|
|
#define MAX_EVENTS_NO 1000
|
|
|
|
#define MAX_EVENT_TEXT_SIZE 10
|
|
|
|
#define EVENTS_PER_PAGE 20
|
2023-05-29 00:06:47 +08:00
|
|
|
|
2023-06-15 18:11:07 +08:00
|
|
|
// Event log entry
|
|
|
|
struct ui_event {
|
|
|
|
int type, prio;
|
|
|
|
unsigned long timestamp;
|
|
|
|
char text[10];
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int events_no;
|
|
|
|
extern struct ui_event events[MAX_EVENTS_NO];
|
|
|
|
|
|
|
|
void ui_event_next();
|
2023-05-26 22:48:20 +08:00
|
|
|
void web_init(struct mg_mgr *mgr);
|