#ifndef SERVERCONFIG_HPP #define SERVERCONFIG_HPP #include "webserv.hpp" struct location { std::string location; std::string root; std::string directoryFile; std::string uploadDir; bool autoindex; bool uploadAccept; std::vector methods; std::map redirect; }; class ServerConfig { private: // TOMLMap *_root; std::string _serverName; std::string _host; int _port; int _clientBodySize; std::map _errorPages; std::vector _locations; public: void setServerName(std::string); void setHost(std::string); void setPort(int); void setClientBodySize(int); void setErrorPages(std::map); void setLocations(std::vector); // void setRoot(TOMLMap *); std::string getServerName(void); std::string getHost(void); int getPort(void); int getClientBodySize(void); std::vector getLocations(void); std::map getErrorPages(void); // TOMLMap *getRoot(void); public: ServerConfig(); // ServerConfig(TOMLMap *root); void fillFields(void); ~ServerConfig(); }; #endif