httpd_conf.h 560 B

123456789101112131415161718192021222324252627
  1. #ifndef HTTPD_CONF_H_
  2. #define HTTPD_CONF_H_
  3. #include "h.h"
  4. #include "iniparser.h"
  5. typedef struct httpd_conf_ctx_s {
  6. IniParser* parser;
  7. int loglevel;
  8. int worker_processes;
  9. int port;
  10. int file_stat_interval;
  11. int file_cached_time;
  12. } httpd_conf_ctx_t;
  13. extern httpd_conf_ctx_t g_conf_ctx;
  14. inline void conf_ctx_init(httpd_conf_ctx_t* ctx) {
  15. ctx->parser = new IniParser;
  16. ctx->loglevel = LOG_LEVEL_DEBUG;
  17. ctx->worker_processes = 0;
  18. ctx->port = 0;
  19. ctx->file_stat_interval = 10;
  20. ctx->file_cached_time = 60;
  21. }
  22. #endif