AbstractServlet.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #include "AbstractServlet.h"
  19. #include "HttpServer.h"
  20. #include "LogModel.h"
  21. AbstractServlet::AbstractServlet(HttpServer* parent)
  22. : QObject(parent)
  23. {
  24. }
  25. AbstractServlet::~AbstractServlet()
  26. {
  27. }
  28. HttpServer* AbstractServlet::server() const
  29. {
  30. return qobject_cast<HttpServer*>(parent());
  31. }
  32. void AbstractServlet::log(const QString & message)
  33. {
  34. server()->logModel()->log(message);
  35. }