aboutsummaryrefslogtreecommitdiff
path: root/src/protocolsetup.hpp
blob: 3b047bc2d5dcddc6eac3fdf04a73db5b1acbd619 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef PROTOCOLSETUP_HPP
#define PROTOCOLSETUP_HPP

#include <QSettings>

#define PROTOCOLS(MAC) \
    MAC(http) \
    MAC(https) \
    MAC(gopher) \
    MAC(guppy) \
    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);


    enum ProtocolSupport { Disabled, Unsupported, Enabled };
    ProtocolSupport isSchemeSupported(QString const & scheme) const;
};

#endif // PROTOCOLSETUP_HPP