net.h 573 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2023 Cesanta Software Limited
  2. // All rights reserved
  3. #pragma once
  4. #include "mongoose.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #if !defined(HTTP_URL)
  9. #define HTTP_URL "http://0.0.0.0:8000"
  10. #endif
  11. #if !defined(HTTPS_URL)
  12. #define HTTPS_URL "https://0.0.0.0:8443"
  13. #endif
  14. #define MAX_DEVICE_NAME 40
  15. #define MAX_EVENTS_NO 400
  16. #define MAX_EVENT_TEXT_SIZE 10
  17. #define EVENTS_PER_PAGE 20
  18. // Event log entry
  19. struct ui_event {
  20. uint8_t type, prio;
  21. unsigned long timestamp;
  22. char text[10];
  23. };
  24. void web_init(struct mg_mgr *mgr);
  25. #ifdef __cplusplus
  26. }
  27. #endif