1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QHTTPSERVER_P_H
6#define QHTTPSERVER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of QHttpServer. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17
18#include <private/qabstracthttpserver_p.h>
19
20#include <QtHttpServer/qhttpserver.h>
21#include <QtHttpServer/qhttpserverresponse.h>
22#include <QtHttpServer/qhttpserverrequest.h>
23#include <QtHttpServer/qhttpserverrouter.h>
24
25#include <QtCore/qglobal.h>
26
27#include <vector>
28
29QT_BEGIN_NAMESPACE
30
31class QHttpServerPrivate: public QAbstractHttpServerPrivate
32{
33 Q_DECLARE_PUBLIC(QHttpServer)
34
35public:
36 QHttpServerPrivate(QHttpServer *p);
37
38 QHttpServerRouter router;
39 struct AfterRequestHandler
40 {
41 QPointer<const QObject> context;
42 QtPrivate::SlotObjUniquePtr slotObject;
43 };
44 std::vector<AfterRequestHandler> afterRequestHandlers;
45 struct MissingHandler
46 {
47 QPointer<const QObject> context = nullptr;
48 QtPrivate::SlotObjUniquePtr slotObject;
49 } missingHandler;
50
51 void callMissingHandler(const QHttpServerRequest &request, QHttpServerResponder &responder);
52};
53
54QT_END_NAMESPACE
55
56#endif // QHTTPSERVER_P_H
57

source code of qthttpserver/src/httpserver/qhttpserver_p.h