#ifndef __HTTPPageList_h__
# define __HTTPPageList_h__

# include "TCPSession.h"
# include "HTTPRequest.h"
# include "__index.h"
# include "__script.h"
# include "__editview.h"
# include "__editview_js.h"
# include "__style.h"
# include "__setupadmin.h"
# include "__favicon_ico.h"
# include "__welcome.h"
# include "__mainmenu.h"
# include "__configure.h"
# include "__viewlist.h"
# include "__workflow.h"
# include "__workflow_js.h"

namespace http {
   
   class HTTPPageList {
      
    public:
      HTTPPageList() {	   
         add(index, "/");
         add(script, "/script");
         add(editview, "/editview");
	 add(editview_js, "/__editview_js");
         add(style, "/style");
         add(setupadmin, "/setupadmin");
         add(favicon_ico, "/favicon.ico");
         add(welcome, "/welcome");
         add(mainmenu, "/mainmenu");
         add(configure, "/configure");
         add(viewlist, "/viewlist");
	 add(workflow, "/workflow");
	 add(workflow_js, "/__workflow_js");
      }      
      
      bool processRequest(HTTPRequest *httpRequest, core::TCPSession *session, HTTPSession *httpSession, std::stringstream &data);      
      
      void add(HTTPPage &page, std::string name = "");
      
      void remove(HTTPPage &page);
      
    protected:
      std::vector<HTTPPage *> pages;
      
    private:
      __index index;
      __script script;
      __style style;
      __editview editview;
      __editview_js editview_js;
      __setupadmin setupadmin;
      __favicon_ico favicon_ico;
      __welcome welcome;
      __mainmenu mainmenu;
      __configure configure;
      __viewlist viewlist;
      __workflow workflow;
      __workflow_js workflow_js;
      
   };

}

#endif
