QDjango
 All Classes Functions Typedefs Enumerations Enumerator Properties Groups Pages
QDjangoHttpRequest.h
1 /*
2  * Copyright (C) 2010-2012 Jeremy LainĂ©
3  * Contact: http://code.google.com/p/qdjango/
4  *
5  * This file is part of the QDjango Library.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  */
17 
18 #ifndef QDJANGO_HTTP_REQUEST_H
19 #define QDJANGO_HTTP_REQUEST_H
20 
21 #include <QString>
22 
23 #include "QDjangoHttp_p.h"
24 
25 class QDjangoHttpRequestPrivate;
26 
37 class QDJANGO_EXPORT QDjangoHttpRequest
38 {
39 public:
42 
43  QByteArray body() const;
44  QString get(const QString &key) const;
45  QString meta(const QString &key) const;
46  QString method() const;
47  QString path() const;
48  QString post(const QString &key) const;
49 
50 private:
51  Q_DISABLE_COPY(QDjangoHttpRequest)
52  QDjangoHttpRequestPrivate* const d;
53  friend class QDjangoFastCgiConnection;
54  friend class QDjangoHttpConnection;
55  friend class QDjangoHttpTestRequest;
56 };
57 
60 class QDJANGO_EXPORT QDjangoHttpTestRequest : public QDjangoHttpRequest
61 {
62 public:
63  QDjangoHttpTestRequest(const QString &method, const QString &path);
64 
65 private:
66  Q_DISABLE_COPY(QDjangoHttpTestRequest)
67 };
68 
71 #endif