KLDAP Library
#include <ldapurl.h>
Inherits KUrl.
Classes | |
struct | Extension |
Public Types | |
enum | Scope { Base , One , Sub } |
Public Member Functions | |
LdapUrl () | |
LdapUrl (const KUrl &url) | |
LdapUrl (const LdapUrl &other) | |
virtual | ~LdapUrl () |
QStringList | attributes () const |
LdapDN | dn () const |
Extension | extension (const QString &extension) const |
QString | extension (const QString &extension, bool &critical) const |
QString | filter () const |
bool | hasExtension (const QString &extension) const |
LdapUrl & | operator= (const LdapUrl &other) |
void | parseQuery () |
void | removeExtension (const QString &extension) |
Scope | scope () const |
void | setAttributes (const QStringList &attributes) |
void | setDn (const LdapDN &dn) |
void | setExtension (const QString &key, const Extension &extension) |
void | setExtension (const QString &key, const QString &value, bool critical=false) |
void | setExtension (const QString &key, int value, bool critical=false) |
void | setFilter (const QString &filter) |
void | setScope (Scope scope) |
void | updateQuery () |
Detailed Description
A special url class for LDAP.
LdapUrl implements an RFC 2255 compliant LDAP Url parser, with minimal differences. LDAP Urls implemented by this class has the following format: ldap[s]://[user[:password]@]hostname[:port]["/" [dn ["?" [attributes] ["?" [scope] ["?" [filter] ["?" extensions]]]]]]
Member Enumeration Documentation
◆ Scope
Constructor & Destructor Documentation
◆ LdapUrl() [1/3]
LdapUrl::LdapUrl | ( | ) |
Constructs an empty LDAP url.
Definition at line 43 of file ldapurl.cpp.
◆ LdapUrl() [2/3]
|
explicit |
Constructs a LDAP url from a KUrl url
.
Definition at line 48 of file ldapurl.cpp.
◆ LdapUrl() [3/3]
LdapUrl::LdapUrl | ( | const LdapUrl & | other | ) |
Constructs a LDAP url from an other url.
Definition at line 59 of file ldapurl.cpp.
◆ ~LdapUrl()
|
virtual |
Destroys the LDAP url.
Definition at line 77 of file ldapurl.cpp.
Member Function Documentation
◆ attributes()
QStringList LdapUrl::attributes | ( | ) | const |
Returns the attributes part of the LDAP url.
Definition at line 101 of file ldapurl.cpp.
◆ dn()
LdapDN LdapUrl::dn | ( | ) | const |
Returns the dn part of the LDAP url.
This is equal to path() with the slash removed from the beginning.
Definition at line 91 of file ldapurl.cpp.
◆ extension() [1/2]
LdapUrl::Extension LdapUrl::extension | ( | const QString & | extension | ) | const |
Returns the specified extension
.
Definition at line 139 of file ldapurl.cpp.
◆ extension() [2/2]
QString LdapUrl::extension | ( | const QString & | extension, |
bool & | critical | ||
) | const |
Returns the specified extension
.
Definition at line 154 of file ldapurl.cpp.
◆ filter()
QString LdapUrl::filter | ( | ) | const |
Returns the filter part of the LDAP url.
Definition at line 123 of file ldapurl.cpp.
◆ hasExtension()
bool LdapUrl::hasExtension | ( | const QString & | extension | ) | const |
Returns whether the specified extension
exists in the LDAP url.
Definition at line 134 of file ldapurl.cpp.
◆ operator=()
Overwrites the values of the LDAP url with values from an other
url.
Definition at line 65 of file ldapurl.cpp.
◆ parseQuery()
void LdapUrl::parseQuery | ( | ) |
Parses the query argument of the URL and makes it available via the attributes(), extension(), filter() and scope() methods.
Definition at line 241 of file ldapurl.cpp.
◆ removeExtension()
void LdapUrl::removeExtension | ( | const QString & | extension | ) |
Removes the specified extension
.
Definition at line 185 of file ldapurl.cpp.
◆ scope()
LdapUrl::Scope LdapUrl::scope | ( | ) | const |
Returns the scope part of the LDAP url.
Definition at line 112 of file ldapurl.cpp.
◆ setAttributes()
void LdapUrl::setAttributes | ( | const QStringList & | attributes | ) |
Sets the attributes
part of the LDAP url.
Definition at line 106 of file ldapurl.cpp.
◆ setDn()
void LdapUrl::setDn | ( | const LdapDN & | dn | ) |
Sets the dn
part of the LDAP url.
Definition at line 82 of file ldapurl.cpp.
◆ setExtension() [1/3]
void LdapUrl::setExtension | ( | const QString & | key, |
const Extension & | extension | ||
) |
Sets the specified extension key
with the value and criticality in extension
.
Definition at line 163 of file ldapurl.cpp.
◆ setExtension() [2/3]
void LdapUrl::setExtension | ( | const QString & | key, |
const QString & | value, | ||
bool | critical = false |
||
) |
Sets the specified extension key
with the value
and criticality specified.
Definition at line 169 of file ldapurl.cpp.
◆ setExtension() [3/3]
void LdapUrl::setExtension | ( | const QString & | key, |
int | value, | ||
bool | critical = false |
||
) |
Sets the specified extension key
with the value
and criticality specified.
Definition at line 177 of file ldapurl.cpp.
◆ setFilter()
void LdapUrl::setFilter | ( | const QString & | filter | ) |
Sets the filter part of the LDAP url.
Definition at line 128 of file ldapurl.cpp.
◆ setScope()
void LdapUrl::setScope | ( | Scope | scope | ) |
Sets the scope part of the LDAP url.
Definition at line 117 of file ldapurl.cpp.
◆ updateQuery()
void LdapUrl::updateQuery | ( | ) |
Updates the query component from the attributes, scope, filter and extensions.
Definition at line 191 of file ldapurl.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.