Libkleo

keyserverconfig.h
1/*
2 kleo/keyserverconfig.h
3
4 This file is part of libkleopatra, the KDE keymanagement library
5 SPDX-FileCopyrightText: 2021 g10 Code GmbH
6 SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#pragma once
12
13#include "kleo_export.h"
14
15#include <QStringList>
16
17#include <memory>
18
19class QString;
20class QUrl;
21
22namespace Kleo
23{
24
25enum class KeyserverAuthentication {
26 Anonymous,
27 ActiveDirectory,
28 Password,
29};
30
31enum class KeyserverConnection {
32 Default,
33 Plain,
34 UseSTARTTLS,
35 TunnelThroughTLS,
36};
37
38class KLEO_EXPORT KeyserverConfig
39{
40public:
41 KeyserverConfig();
42 ~KeyserverConfig();
43
44 KeyserverConfig(const KeyserverConfig &other);
45 KeyserverConfig &operator=(const KeyserverConfig &other);
46
47 KeyserverConfig(KeyserverConfig &&other);
48 KeyserverConfig &operator=(KeyserverConfig &&other);
49
50 static KeyserverConfig fromUrl(const QUrl &url);
51 QUrl toUrl() const;
52
53 QString host() const;
54 void setHost(const QString &host);
55
56 int port() const;
57 void setPort(int port);
58
59 KeyserverAuthentication authentication() const;
60 void setAuthentication(KeyserverAuthentication authentication);
61
62 QString user() const;
63 void setUser(const QString &user);
64
65 QString password() const;
66 void setPassword(const QString &password);
67
68 KeyserverConnection connection() const;
69 void setConnection(KeyserverConnection connection);
70
71 QString ldapBaseDn() const;
72 void setLdapBaseDn(const QString &baseDn);
73
74 QStringList additionalFlags() const;
75 void setAdditionalFlags(const QStringList &flags);
76
77private:
78 class Private;
79 std::unique_ptr<Private> d;
80};
81
82}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.