QDjango
Toggle main menu visibility
Loading...
Searching...
No Matches
src
http
QDjangoHttpServer.h
1
/*
2
* Copyright (C) 2010-2015 Jeremy Lainé
3
* Contact: https://github.com/jlaine/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_SERVER_H
19
#define QDJANGO_HTTP_SERVER_H
20
21
#include <QHostAddress>
22
#include <QObject>
23
24
#include "QDjangoHttp_p.h"
25
26
class
QDjangoHttpRequest
;
27
class
QDjangoHttpResponse
;
28
class
QDjangoHttpServer
;
29
class
QDjangoHttpServerPrivate;
30
class
QDjangoUrlResolver
;
31
42
class
QDJANGO_HTTP_EXPORT
QDjangoHttpServer
:
public
QObject
43
{
44
Q_OBJECT
45
46
public
:
47
QDjangoHttpServer
(QObject *parent = 0);
48
~QDjangoHttpServer
();
49
50
void
close
();
51
bool
listen
(
const
QHostAddress &address, quint16 port);
52
QHostAddress
serverAddress
()
const
;
53
quint16
serverPort
()
const
;
54
QDjangoUrlResolver
*
urls
()
const
;
55
56
signals:
59
void
requestFinished
(
QDjangoHttpRequest
*request,
QDjangoHttpResponse
*response);
60
61
private
slots:
62
void
_q_newTcpConnection();
63
64
private
:
65
Q_DISABLE_COPY(
QDjangoHttpServer
)
66
QDjangoHttpServerPrivate*
const
d;
67
};
68
69
#endif
QDjangoHttpRequest
The QDjangoHttpRequest class represents an HTTP request.
Definition
QDjangoHttpRequest.h:32
QDjangoHttpResponse
The QDjangoHttpResponse class represents an HTTP response.
Definition
QDjangoHttpResponse.h:32
QDjangoHttpServer
The QDjangoHttpServer class represents an HTTP server.
Definition
QDjangoHttpServer.h:43
QDjangoHttpServer::listen
bool listen(const QHostAddress &address, quint16 port)
Definition
QDjangoHttpServer.cpp:306
QDjangoHttpServer::serverAddress
QHostAddress serverAddress() const
Definition
QDjangoHttpServer.cpp:324
QDjangoHttpServer::close
void close()
Definition
QDjangoHttpServer.cpp:297
QDjangoHttpServer::serverPort
quint16 serverPort() const
Definition
QDjangoHttpServer.cpp:334
QDjangoHttpServer::urls
QDjangoUrlResolver * urls() const
Definition
QDjangoHttpServer.cpp:344
QDjangoHttpServer::QDjangoHttpServer
QDjangoHttpServer(QObject *parent=0)
Definition
QDjangoHttpServer.cpp:278
QDjangoHttpServer::requestFinished
void requestFinished(QDjangoHttpRequest *request, QDjangoHttpResponse *response)
QDjangoUrlResolver
The QDjangoUrlResolver class maps incoming HTTP requests to handlers.
Definition
QDjangoUrlResolver.h:36
Generated by
1.17.0