aboutsummaryrefslogtreecommitdiff
path: root/src/protocolsetup.hpp
blob: db163de52a6c56ee8c5b85ee0fc6fe1b8232d1fc (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
#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);


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

#endif // PROTOCOLSETUP_HPP