web_vendor.h 785 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef FOUNDATION_WEBCONFIG_WEBVENDOR_H
  2. #define FOUNDATION_WEBCONFIG_WEBVENDOR_H
  3. #include <vendor_global.h>
  4. class WebVendor : public vendor::VendorBase {
  5. public:
  6. WebVendor();
  7. virtual ~WebVendor();
  8. virtual int Run();
  9. virtual std::string Name();
  10. virtual void Stop(int signal);
  11. protected:
  12. virtual int ParseCmdline(const std::string &optname, const std::string &optarg);
  13. virtual vendor::MyOpt *GetOpts();
  14. virtual int GetOptSize();
  15. private:
  16. void DumpWebVendor();
  17. void DefineWeb();
  18. private:
  19. int32_t listenPort_ = 8880;
  20. std::string authFile_;
  21. std::string routeFile_;
  22. std::string docFile_;
  23. std::string homeDir_;
  24. bool debug_ = false;
  25. int finish_ = 0;
  26. int duration_ = 0;
  27. };
  28. #endif // FOUNDATION_WEBCONFIG_WEBVENDOR_H