#ifndef __HTTPServer_h__
#define __HTTPServer_h__

#include "TCPServer.h"
#include "HTTPSessions.h"
#include "HTTPPageList.h"
#include "HTTPActionList.h"
#include "HTTPConnection.h"
#include "HTTPGETHandler.h"
#include "HTTPPOSTHandler.h"
#include "HTTPPUTHandler.h"

namespace http {

   class TCPSession;

   class HTTPServer : public core::TCPServer {

    public:
      HTTPServer(core::EPoll &ePoll, core::IPAddress ipAddress, HTTPSessions &httpSessions);

      core::TCPSession * getSocketAccept(core::EPoll &epoll) override;

      HTTPSessions &httpSessions;
      HTTPPageList pageList;
      HTTPActionList actionList;

    private:
      HTTPGETHandler getHandler;
      HTTPPOSTHandler postHandler;
      HTTPPUTHandler putHandler;

   };

}

#endif
