httpd_conf.h 438 B

1234567891011121314151617181920212223
  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. } httpd_conf_ctx_t;
  11. extern httpd_conf_ctx_t g_conf_ctx;
  12. inline void conf_ctx_init(httpd_conf_ctx_t* ctx) {
  13. ctx->parser = new IniParser;
  14. ctx->loglevel = LOG_LEVEL_DEBUG;
  15. ctx->worker_processes = 0;
  16. ctx->port = 0;
  17. }
  18. #endif