tufao  1.3.0
An asynchronous web framework for C++ built on top of Qt
httpserverplugin.h File Reference
+ Include dependency graph for httpserverplugin.h:

Go to the source code of this file.

Classes

class  Tufao::HttpServerPlugin
 This class provides a factory interface to create request handlers and comunicate with factories of other plugins. More...
 

Namespaces

 Tufao
 This is the namespace where all Tufão facilities are grouped.
 

Macros

#define TUFAO_HTTPSERVERPLUGIN_IID   "Tufao::HttpServerPlugin/1.0"
 This definition stores the Tufao::HttpServerPlugin interface IID. More...
 

Macro Definition Documentation

#define TUFAO_HTTPSERVERPLUGIN_IID   "Tufao::HttpServerPlugin/1.0"

This definition stores the Tufao::HttpServerPlugin interface IID.

When you define a plugin, you'll use this macro as the IID argument of Q_PLUGIN_METADATA macro to tell the class is implementing the Tufao::HttpServerPlugin interface. Example:

#ifndef PLUGIN_H
#define PLUGIN_H
#include <Tufao/HttpServerPlugin>
class Plugin: public QObject, Tufao::HttpServerPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID TUFAO_HTTPSERVERPLUGIN_IID)
public:
std::function<bool(Tufao::HttpServerRequest&, Tufao::HttpServerResponse&)>
createHandler(const QHash<QString, Tufao::HttpServerPlugin*> &dependencies,
const QVariant &customData = QVariant()) override;
};
#endif // PLUGIN_H