7#include "ldapsearchclientreadconfigserverjob.h"
9#include "ldapclient_core_debug.h"
10#include "ldapclientsearchconfigreadconfigjob.h"
11using namespace KLDAPCore;
12LdapSearchClientReadConfigServerJob::LdapSearchClientReadConfigServerJob(
QObject *parent)
17LdapSearchClientReadConfigServerJob::~LdapSearchClientReadConfigServerJob() =
default;
19void LdapSearchClientReadConfigServerJob::start()
22 qCWarning(LDAPCLIENT_CORE_LOG) <<
" Impossible to start LdapSearchClientReadConfigServerJob";
26 auto job =
new LdapClientSearchConfigReadConfigJob(
this);
27 connect(job, &LdapClientSearchConfigReadConfigJob::configLoaded,
this, &LdapSearchClientReadConfigServerJob::slotConfigLoaded);
28 job->setActive(mActive);
29 job->setConfig(mConfig);
30 job->setServerIndex(mCurrentIndex);
34bool LdapSearchClientReadConfigServerJob::canStart()
const
36 return mCurrentIndex != -1 && mConfig.isValid();
39void LdapSearchClientReadConfigServerJob::slotConfigLoaded(
const KLDAPCore::LdapServer &server)
41 mLdapClient->setServer(server);
45LdapClient *LdapSearchClientReadConfigServerJob::ldapClient()
const
50void LdapSearchClientReadConfigServerJob::setLdapClient(
LdapClient *ldapClient)
52 mLdapClient = ldapClient;
55int LdapSearchClientReadConfigServerJob::currentIndex()
const
60void LdapSearchClientReadConfigServerJob::setCurrentIndex(
int currentIndex)
62 mCurrentIndex = currentIndex;
65bool LdapSearchClientReadConfigServerJob::active()
const
70void LdapSearchClientReadConfigServerJob::setActive(
bool active)
75KConfigGroup LdapSearchClientReadConfigServerJob::config()
const
80void LdapSearchClientReadConfigServerJob::setConfig(
const KConfigGroup &config)
85#include "moc_ldapsearchclientreadconfigserverjob.cpp"
An object that represents a configured LDAP server.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)