cutelyst  4.4.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/cutelyst_plugin_staticcompressed_export.h>
10 
11 namespace Cutelyst {
12 
13 class StaticCompressedPrivate;
14 
199 class 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)
205 public:
209  explicit StaticCompressed(Application *parent);
210 
219  StaticCompressed(Application *parent, const QVariantMap &defaultConfig);
220 
224  ~StaticCompressed() override;
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 
279 private:
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.