QDjango
|
00001 /* 00002 * Copyright (C) 2010-2012 Jeremy Lainé 00003 * Contact: http://code.google.com/p/qdjango/ 00004 * 00005 * This file is part of the QDjango Library. 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 */ 00017 00018 #ifndef QDJANGO_FASTCGI_SERVER_H 00019 #define QDJANGO_FASTCGI_SERVER_H 00020 00021 #include <QHostAddress> 00022 #include <QObject> 00023 00024 #include "QDjangoHttp_p.h" 00025 00026 class QDjangoFastCgiServerPrivate; 00027 class QDjangoHttpController; 00028 class QDjangoUrlResolver; 00029 00040 class QDJANGO_EXPORT QDjangoFastCgiServer : public QObject 00041 { 00042 Q_OBJECT 00043 00044 public: 00045 QDjangoFastCgiServer(QObject *parent = 0); 00046 ~QDjangoFastCgiServer(); 00047 00048 void close(); 00049 bool listen(const QString &name); 00050 bool listen(const QHostAddress &address, quint16 port); 00051 QDjangoUrlResolver *urls() const; 00052 00053 private slots: 00054 void _q_newLocalConnection(); 00055 void _q_newTcpConnection(); 00056 00057 private: 00058 Q_DISABLE_COPY(QDjangoFastCgiServer) 00059 QDjangoFastCgiServerPrivate *d; 00060 }; 00061 00062 #endif