KLdap
ldapsearch.cpp
32 [[nodiscard]] bool startSearch(const LdapDN &base, LdapUrl::Scope scope, const QString &filter, const QStringList &attributes, int pagesize, int count);
63 if (res != 0 && (res == -1 || (mConn->ldapErrorCode() != KLDAP_SUCCESS && mConn->ldapErrorCode() != KLDAP_SASL_BIND_IN_PROGRESS))) {
188bool LdapSearchPrivate::startSearch(const LdapDN &base, LdapUrl::Scope scope, const QString &filter, const QStringList &attributes, int pagesize, int count)
190 qCDebug(LDAP_CORE_LOG) << "search: base=" << base.toString() << "scope=" << static_cast<int>(scope) << "filter=" << filter << "attributes=" << attributes
301bool LdapSearch::search(const LdapDN &base, LdapUrl::Scope scope, const QString &filter, const QStringList &attributes, int pagesize, int count)
This class represents a connection to an LDAP server.
Definition ldapconnection.h:24
QString ldapErrorString() const
Returns the LDAP error string from the last operation.
Definition ldapconnection.cpp:399
int connect()
Sets up the connection parameters with creating a handle to the LDAP server.
Definition ldapconnection.cpp:429
QString saslErrorString() const
Returns the SASL error string from the last SASL operation.
Definition ldapconnection.cpp:130
int setOption(int option, void *value)
Sets an option in the connection.
Definition ldapconnection.cpp:387
QString connectionError() const
Returns a translated error string if connect() failed.
Definition ldapconnection.cpp:137
int ldapErrorCode() const
Returns the LDAP error code from the last operation.
Definition ldapconnection.cpp:393
static void insert(LdapControls &list, const LdapControl &ctrl)
Inserts a unique control against a list of controls.
Definition ldapcontrol.cpp:123
static LdapControl createPageControl(int pagesize, const QByteArray &cookie=QByteArray())
Creates a paging search control.
Definition ldapcontrol.cpp:112
This class allows sending an ldap operation (search, rename, modify, delete, compare,...
Definition ldapoperation.h:31
QByteArray serverCred() const
Returns the server response for a bind request (result returned RES_BIND).
Definition ldapoperation.cpp:150
void setServerControls(const LdapControls &ctrls)
Sets the server controls which will sent with each operation.
Definition ldapoperation.cpp:105
LdapObject object() const
Returns the result object if result() returned RES_SEARCH_ENTRY.
Definition ldapoperation.cpp:120
int bind(const QByteArray &creds=QByteArray(), SASL_Callback_Proc *saslproc=nullptr, void *data=nullptr)
Binds to the server which specified in the connection object.
Definition ldapoperation.cpp:1165
LdapControls controls() const
Returns the server controls from the returned ldap message (grabbed by result()).
Definition ldapoperation.cpp:125
LdapControls serverControls() const
Returns the server controls (which set by setServerControls()).
Definition ldapoperation.cpp:115
int waitForResult(int id, int msecs=-1)
Waits for up to msecs milliseconds for a result message from the LDAP server.
Definition ldapoperation.cpp:1267
int search(const LdapDN &base, LdapUrl::Scope scope, const QString &filter, const QStringList &attrs)
Starts a search operation with the given base DN, scope, filter and result attributes.
Definition ldapoperation.cpp:1177
This class starts a search operation on a LDAP server and returns the search values via a Qt signal.
Definition ldapsearch.h:33
void continueSearch()
Continues the search (if you set count to non-zero in search(), and isFinished() is false)
Definition ldapsearch.cpp:307
QString errorString() const
Returns the error description of the search operation.
Definition ldapsearch.cpp:331
void setConnection(LdapConnection &connection)
Sets the connection for this object to use for searches from now onwards, regardless of the LDAP Url ...
Definition ldapsearch.cpp:258
void result(KLDAPCore::LdapSearch *search)
Emitted when the searching finished.
bool isFinished() const
Returns true if the search is finished else returns false.
Definition ldapsearch.cpp:316
int error() const
Returns the error code of the search operation (0 if no error).
Definition ldapsearch.cpp:326
void data(KLDAPCore::LdapSearch *search, const KLDAPCore::LdapObject &obj)
Emitted for each result object.
bool search(const LdapServer &server, const QStringList &attributes=QStringList(), int count=0)
Starts a search operation on the LDAP server.
Definition ldapsearch.cpp:275
void setClientControls(const LdapControls &ctrls)
Sets the client controls which will sent with each operation.
Definition ldapsearch.cpp:265
void setServerControls(const LdapControls &ctrls)
Sets the server controls which will sent with each operation.
Definition ldapsearch.cpp:270
A class that contains LDAP server connection settings.
Definition ldapserver.h:27
QString filter() const
Returns the filter string of the LDAP connection.
Definition ldapserver.cpp:130
LdapUrl::Scope scope() const
Returns the search scope of the LDAP connection.
Definition ldapserver.cpp:135
Extension extension(const QString &extension) const
Returns the specified extension.
Definition ldapurl.cpp:120
QString i18n(const char *text, const TYPE &arg...)
bool isEmpty() const const
const_reference at(qsizetype i) const const
qsizetype count() const const
void clear()
bool isEmpty() const const
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.