aboutsummaryrefslogtreecommitdiff
path: root/plugins/interfaces.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/interfaces.h')
-rw-r--r--plugins/interfaces.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/interfaces.h b/plugins/interfaces.h
new file mode 100644
index 0000000..a43964a
--- /dev/null
+++ b/plugins/interfaces.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of smolbote. It's copyrighted by the contributors recorded
+ * in the version control history of the file, available from its original
+ * location: git://neueland.iserlohn-fortress.net/smolbote.git
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef INTERFACES_H
+#define INTERFACES_H
+
+#include <QtPlugin>
+
+class QString;
+class QAction;
+class QWidget;
+class QWebEngineProfile;
+
+class PluginInterface
+{
+public:
+ virtual ~PluginInterface() = default;
+};
+
+class ProfileInterface
+{
+public:
+ virtual ~ProfileInterface() = default;
+
+ virtual QWidget *createWidget(QWebEngineProfile *profile, QWidget *parent) = 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)
+
+#endif //INTERFACES_H