aboutsummaryrefslogtreecommitdiff
path: root/plugins/interfaces.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/interfaces.h')
-rw-r--r--plugins/interfaces.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/plugins/interfaces.h b/plugins/interfaces.h
index aad43c1..fc8eac8 100644
--- a/plugins/interfaces.h
+++ b/plugins/interfaces.h
@@ -20,6 +20,13 @@ class QDialog;
class WebProfile;
class Configuration;
+class BrowserInterface
+{
+public:
+ virtual Configuration *getConfiguration() const = 0;
+ virtual const QVector<WebProfile *> profiles() const = 0;
+};
+
struct Plugin
{
QString name;
@@ -36,29 +43,17 @@ public:
virtual ~PluginInterface() = default;
virtual CommandHash_t commands() = 0;
virtual QDialog *createWidget(QWidget *parent = nullptr) = 0;
-};
-class ProfileInterface
-{
-public:
- virtual ~ProfileInterface() = default;
- virtual void registerProfile(WebProfile *profile) = 0;
-};
+ void setBrowserInterface(BrowserInterface *browser)
+ {
+ this->browser = browser;
+ }
-class ConfigurationInterface
-{
-public:
- virtual ~ConfigurationInterface() = default;
- virtual void setConfiguration(Configuration *cfg) = 0;
+protected:
+ BrowserInterface *browser = nullptr;
};
#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