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

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

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