cutelyst 5.0.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
staticcompressed.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2023 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef STATICCOMPRESSED_H
6#define STATICCOMPRESSED_H
7
8#include <Cutelyst/Plugin>
9#include <Cutelyst/Plugins/staticcompressed_export.h>
10
11namespace Cutelyst {
12
13class StaticCompressedPrivate;
14
199class CUTELYST_PLUGIN_STATICCOMPRESSED_EXPORT // clazy:exclude=ctor-missing-parent-argument
200 StaticCompressed : public Plugin
201{
202 Q_OBJECT
203 Q_DECLARE_PRIVATE(StaticCompressed) // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
204 Q_DISABLE_COPY(StaticCompressed)
205public:
209 explicit StaticCompressed(Application *parent);
210
219 StaticCompressed(Application *parent, const QVariantMap &defaultConfig);
220
225
232 void setIncludePaths(const QStringList &paths);
233
260 void setDirs(const QStringList &dirs);
261
269 void setServeDirsOnly(bool dirsOnly);
270
277 bool setup(Application *app) override;
278
279private:
280 std::unique_ptr<StaticCompressedPrivate> d_ptr;
281};
282
283} // namespace Cutelyst
284
285#endif // STATICCOMPRESSED_H
The Cutelyst application.
Definition application.h:66
Base class for Cutelyst Plugins.
Definition plugin.h:25
Serve static files compressed on the fly or pre-compressed.
The Cutelyst namespace holds all public Cutelyst API.