bigsnitch/pluginhandler.h
Tim Blume 600d7146d3 foo
2021-03-20 22:56:03 +01:00

31 lines
782 B
C++

#pragma once
#include <include/api.h>
#include <include/proxyinterface.h>
#include <QObject>
#include <QDir>
#include <QPluginLoader>
#include <proxyhandler.h>
//! PluginHandler controls all plugins.
//! Every different plugin interface, that got signals has to reference them here
//! Other parts of bigsnitch connect to them here.
class PluginHandler : public QObject
{
Q_OBJECT
private:
QStringList loaded_plugins;
http::ProxyHandler proxyhandler;
public:
//! Loads a single plugin.
bool load(QString path);
//! loads all plugins in a directory.
void loadPlugins(QDir path);
signals:
//! error signal from ProxyInterface
void proxy_error(QString err);
//! message signal from ProxyInterface
void proxy_message(http::Flow flow);
};