KLdap
ldapclientsearch.cpp
46 void readWeighForClient(KLDAPCore::LdapClient *client, const KConfigGroup &config, int clientNumber);
106void LdapClientSearch::LdapClientSearchPrivate::readWeighForClient(KLDAPCore::LdapClient *client, const KConfigGroup &config, int clientNumber)
108 const int completionWeight = config.readEntry(QStringLiteral("SelectedCompletionWeight%1").arg(clientNumber), -1);
152 const QStringList attr{QStringLiteral("cn"), QStringLiteral("mail"), QStringLiteral("givenname"), QStringLiteral("sn")};
182 q->connect(ldapClient, &KLDAPCore::LdapClient::result, q, [this](const KLDAPCore::LdapClient &client, const KLDAPCore::LdapObject &obj) {
188 q->connect(ldapClient, qOverload<const QString &>(&KLDAPCore::LdapClient::error), q, [this](const QString &str) {
199 mConfigFile = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/kabldaprc");
255void LdapClientSearch::LdapClientSearchPrivate::slotLDAPResult(const KLDAPCore::LdapClient &client, const KLDAPCore::LdapObject &obj)
306void LdapClientSearch::LdapClientSearchPrivate::makeSearchData(QStringList &ret, KLDAPCore::LdapResult::List &resList)
323 for (it2 = (*it1).object.attributes().constBegin(); it2 != (*it1).object.attributes().constEnd(); ++it2) {
366 } else if (it2.key() == "objectClass"_L1 && (tmp == "groupOfNames"_L1 || tmp == "kolabGroupOfNames"_L1)) {
QString readEntry(const char *key, const char *aDefault=nullptr) const
void addFile(const QString &file)
static KDirWatch * self()
void dirty(const QString &path)
LdapClientSearch(QObject *parent=nullptr)
Creates a new ldap client search object.
Definition ldapclientsearch.cpp:70
void updateCompletionWeights()
Updates the completion weights for the configured LDAP clients from the configuration file.
Definition ldapclientsearch.cpp:114
void setAttributes(const QStringList &)
Sets the attributes, that are queried the LDAP Server.
Definition ldapclientsearch.cpp:142
QList< KLDAPCore::LdapClient * > clients() const
Returns the list of configured LDAP clients.
Definition ldapclientsearch.cpp:122
bool isAvailable() const
Returns whether LDAP search is possible at all.
Definition ldapclientsearch.cpp:413
~LdapClientSearch() override
Destroys the ldap client search object.
void searchDone()
This signal is emitted whenever the lookup is complete or the user has canceled the query.
QStringList attributes() const
Returns the attributes, that are queried the LDAP Server.
Definition ldapclientsearch.cpp:137
void startSearch(const QString &query)
Starts the LDAP search on all configured LDAP clients with the given search query.
Definition ldapclientsearch.cpp:210
void result(const KLDAPCore::LdapClient &client, const KLDAPCore::LdapObject &)
This signal is emitted once for each object that is returned from the query.
void error(const QString &message)
This signal is emitted in case of an error.
void setCompletionWeight(int weight)
Sets the completion weight of this client.
Definition ldapclient.cpp:272
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
QString name(StandardAction id)
QAction * mail(const QObject *recvr, const char *slot, QObject *parent)
const char * constData() const const
QByteArray first(qsizetype n) const const
qsizetype size() const const
ConstIterator
Iterator
void append(QList< T > &&value)
bool isEmpty() const const
ConstIterator
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
ConfigLocation
QString writableLocation(StandardLocation type)
QString arg(Args &&... args) const const
const_iterator constBegin() const const
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString mid(qsizetype position, qsizetype n) const const
QueuedConnection
void timeout()
Describes the result returned by an LdapClientSearch query.
Definition ldapclientsearch.h:24
Describes the result returned by an LdapClientSearch query.
Definition ldapclientsearch.h:35
int clientNumber
The client the contact comes from (used for sorting in a ldap-only lookup).
Definition ldapclientsearch.h:44
int completionWeight
The weight of the contact (used for sorting in a completion list).
Definition ldapclientsearch.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.