Httpserver.h 787 B

123456789101112131415161718192021222324
  1. #include <AlgorithmModel.h>
  2. #include <qstring.h>
  3. #include <map>
  4. #include "httplib.h"
  5. using namespace httplib;
  6. class HttpServer
  7. {
  8. public:
  9. static int RunHttpServer();
  10. //static std::map<QString, AlgorithmModel*> m_plugins;
  11. static void fn(struct mg_connection* c, int ev, void* ev_data, void* fn_data);
  12. private:
  13. //static void SaveLog(QString msg);
  14. //static char* GetStringSilce(const char* source, int offset, int lenght);
  15. static std::string stringUTF8(const std::string& str);
  16. static std::string UTF8string(std::string strTemp);
  17. //static char* UTF82WCS(const char* szU8, int lenght);
  18. static std::string log(const Request& req, const Response& res);
  19. static std::string dump_headers(const Headers& headers);
  20. };
  21. //std::map<QString, AlgorithmModel*> HttpServer::m_plugins = new ;