aboutsummaryrefslogtreecommitdiff
path: root/src/protocolsetup.hpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-07 01:06:07 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-07 01:06:07 +0200
commit093bfcc50d5889358ed806096ac5652a9e925cfc (patch)
treef0276f86cf9b14309851b9d3136c370503ecea64 /src/protocolsetup.hpp
parentd4d353dab0f7c2fe2e1d76f6666f848e077d07dd (diff)
downloadkristall-093bfcc50d5889358ed806096ac5652a9e925cfc.tar.gz
Implements multi-protocol support. Adds support for HTTP/HTTPS, adds settings to enable/disable protocols
Diffstat (limited to 'src/protocolsetup.hpp')
-rw-r--r--src/protocolsetup.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/protocolsetup.hpp b/src/protocolsetup.hpp
new file mode 100644
index 0000000..3cf3ab1
--- /dev/null
+++ b/src/protocolsetup.hpp
@@ -0,0 +1,28 @@
+#ifndef PROTOCOLSETUP_HPP
+#define PROTOCOLSETUP_HPP
+
+#include <QSettings>
+
+#define PROTOCOLS(MAC) \
+ MAC(http) \
+ MAC(https) \
+ MAC(gopher) \
+ MAC(gemini) \
+ MAC(finger)
+
+struct ProtocolSetup
+{
+#define DECL(X) bool X;
+ PROTOCOLS(DECL)
+#undef DECL
+
+ ProtocolSetup();
+
+ void save(QSettings & settings) const;
+
+ void load(QSettings & settings);
+
+ bool isSchemeSupported(QString const & scheme) const;
+};
+
+#endif // PROTOCOLSETUP_HPP