QDjango
QDjangoHttpRequest.h
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_HTTP_REQUEST_H
00019 #define QDJANGO_HTTP_REQUEST_H
00020 
00021 #include <QString>
00022 
00023 #include "QDjangoHttp_p.h"
00024 
00025 class QDjangoHttpRequestPrivate;
00026 
00037 class QDJANGO_EXPORT QDjangoHttpRequest
00038 {
00039 public:
00040     QDjangoHttpRequest();
00041     ~QDjangoHttpRequest();
00042 
00043     QByteArray body() const;
00044     QString get(const QString &key) const;
00045     QString meta(const QString &key) const;
00046     QString method() const;
00047     QString path() const;
00048     QString post(const QString &key) const;
00049 
00050 private:
00051     Q_DISABLE_COPY(QDjangoHttpRequest)
00052     QDjangoHttpRequestPrivate* const d;
00053     friend class QDjangoFastCgiConnection;
00054     friend class QDjangoHttpConnection;
00055     friend class QDjangoHttpTestRequest;
00056 };
00057 
00060 class QDJANGO_EXPORT QDjangoHttpTestRequest : public QDjangoHttpRequest
00061 {
00062 public:
00063     QDjangoHttpTestRequest(const QString &method, const QString &path);
00064 };
00065 
00068 #endif
 All Classes Functions Typedefs Enumerations Enumerator Properties