aboutsummaryrefslogtreecommitdiff
path: root/plugins/interfaces.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/interfaces.h')
-rw-r--r--plugins/interfaces.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/interfaces.h b/plugins/interfaces.h
index 1a12f02..aad43c1 100644
--- a/plugins/interfaces.h
+++ b/plugins/interfaces.h
@@ -18,6 +18,7 @@ class QString;
class QAction;
class QDialog;
class WebProfile;
+class Configuration;
struct Plugin
{
@@ -27,26 +28,37 @@ struct Plugin
QObject *instance;
};
+typedef QHash<QString, std::function<int()>> CommandHash_t;
+
class PluginInterface
{
public:
virtual ~PluginInterface() = default;
- virtual QHash<QString, std::function<int()>> commands() = 0;
+ virtual CommandHash_t commands() = 0;
+ virtual QDialog *createWidget(QWidget *parent = nullptr) = 0;
};
class ProfileInterface
{
public:
virtual ~ProfileInterface() = default;
- virtual QDialog *createWidget(QWidget *parent = nullptr) = 0;
-
virtual void registerProfile(WebProfile *profile) = 0;
};
+class ConfigurationInterface
+{
+public:
+ virtual ~ConfigurationInterface() = default;
+ virtual void setConfiguration(Configuration *cfg) = 0;
+};
+
#define PluginInterfaceIid "net.iserlohn-fortress.smolbote.PluginInterface"
Q_DECLARE_INTERFACE(PluginInterface, PluginInterfaceIid)
#define ProfileInterfaceIid "net.iserlohn-fortress.smolbote.ProfileInterface"
Q_DECLARE_INTERFACE(ProfileInterface, ProfileInterfaceIid)
+#define ConfigurationInterfaceIid "net.iserlohn-fortress.smolbote.ConfigurationInterface"
+Q_DECLARE_INTERFACE(ConfigurationInterface, ConfigurationInterfaceIid)
+
#endif // SMOLBOTE_PLUGIN_INTERFACES_H