KLdap

ldapsearchclientreadconfigserverjob.h
1/*
2 * SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include "kldapwidgets_export.h"
10#include <KConfigGroup>
11#include <QObject>
12namespace KLDAPCore
13{
14class LdapServer;
15}
16namespace KLDAPWidgets
17{
18class LdapClient;
19class KLDAPWIDGETS_EXPORT LdapSearchClientReadConfigServerJob : public QObject
20{
21 Q_OBJECT
22public:
23 explicit LdapSearchClientReadConfigServerJob(QObject *parent = nullptr);
24 ~LdapSearchClientReadConfigServerJob() override;
25
26 void start();
27 [[nodiscard]] bool canStart() const;
28
29 [[nodiscard]] int currentIndex() const;
30 void setCurrentIndex(int currentIndex);
31
32 [[nodiscard]] bool active() const;
33 void setActive(bool active);
34
35 [[nodiscard]] KConfigGroup config() const;
36 void setConfig(const KConfigGroup &config);
37
38 [[nodiscard]] LdapClient *ldapClient() const;
39 void setLdapClient(LdapClient *ldapClient);
40
41private:
42 KLDAPWIDGETS_NO_EXPORT void slotConfigLoaded(const KLDAPCore::LdapServer &server);
43 LdapClient *mLdapClient = nullptr;
44 KConfigGroup mConfig;
45 int mCurrentIndex = -1;
46 bool mActive = false;
47};
48}
A class that contains LDAP server connection settings.
Definition ldapserver.h:27
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:34 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.