// -*- mode: c++; c-basic-offset: 2; -*- #ifndef PROXY_HH #define PROXY_HH #include class Config; class Logger; class Looper; class Resolver; class Proxy { public: virtual ~Proxy() {} static Proxy* create(Config* config, std::string const& cwd, char const* configfile, char const* logfile, Logger* logger, int accept_fd, int monitor_fd, Looper* looper, Resolver* resolver); static int setup_accept_socket(Config* config, Logger* logger); static int setup_monitor_socket(Config* config, Logger* logger); // Called from signal handler, ask the proxy to exit as soon as possible virtual void quit() = 0; // Called from signal handler, ask the proxy to reload config as soon // as possible virtual void reload() = 0; virtual bool run() = 0; protected: Proxy() {} Proxy(Proxy const&) = delete; }; #endif // PROXY_HH