AbstractServlet.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /***************************************************************************
  2. * Copyright (C) 2009, 2010 by Axel Jaeger <axeljaeger@googlemail.com> *
  3. * *
  4. * This file is part of Glowworm. *
  5. * *
  6. * Glowworm is free software: you can redistribute it and/or modify *
  7. * it under the terms of the GNU General Public License as published by *
  8. * the Free Software Foundation, version 3 of the License. *
  9. * *
  10. * Glowworm is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with Glowworm. If not, see <http://www.gnu.org/licenses/>. *
  17. ***************************************************************************/
  18. #ifndef ABSTRACTSERVLET_H
  19. #define ABSTRACTSERVLET_H
  20. #include <QObject>
  21. #include <QString>
  22. class HttpRequest;
  23. class HttpResponse;
  24. class HttpServer;
  25. class AbstractServlet : public QObject
  26. {
  27. Q_OBJECT
  28. public:
  29. explicit AbstractServlet(HttpServer* parent);
  30. ~AbstractServlet();
  31. virtual void request(HttpRequest* request, HttpResponse* response) = 0;
  32. HttpServer* server() const;
  33. protected:
  34. void log(const QString & message);
  35. private:
  36. };
  37. #endif // ABSTRACTSERVLET_H