C++ Web Framework  3.0
filterchain.h
1 /*
2  Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
3  Distributed under MIT license, or public domain if desired and
4  recognized in your jurisdiction.
5  See file LICENSE for detail.
6 */
7 
8 #ifndef FILTERCHAIN_H
9 #define FILTERCHAIN_H
10 
11 #include "filemanager.h"
12 #include "request.h"
13 #include "response.h"
14 #include "controller.h"
15 #include "filterchain.h"
16 #include "httpparser.h"
17 #include "constants.h"
18 #include "requestdispatcher.h"
19 #include "cppwebframework_global.h"
20 #include <QFile>
21 
22 CWF_BEGIN_NAMESPACE
29 class CPPWEBFRAMEWORKSHARED_EXPORT FilterChain final
30 {
31  Controller *controller = nullptr;
32  const Configuration &configuration;
41  void write(Response &response, const QString &path, const QString &url, const QByteArray &name, const QByteArray &value) const;
42 public:
47  FilterChain(Controller *controller, const Configuration &configuration);
54  void doFilter(CWF::Request &request, CWF::Response &response);
55 };
56 
57 CWF_END_NAMESPACE
58 
59 #endif // FILTERCHAIN_H
The FilterChain class is responsable to dispatch a requisition. This class was built to work with Fil...
Definition: filterchain.h:29
The Controller class is responsable to attend a request from a specific url. You will need to create ...
Definition: controller.h:28
All classes of C++ Web Framework are contained within the namespace CWF.
Definition: configuration.h:24
The Response class is responsable to response a Http request.
Definition: response.h:25