kabc Library API Documentation

KABC::LDAPUrl Class Reference

LDAPUrl. More...

#include <ldapurl.h>

Inheritance diagram for KABC::LDAPUrl:

KURL List of all members.

Public Types

enum  Scope { Base, One, Sub }

Public Member Functions

 LDAPUrl ()
 LDAPUrl (const KURL &url)
const QStringdn () const
void setDn (const QString &dn)
const QStringListattributes ()
void setAttributes (const QStringList &attributes)
Scope scope () const
void setScope (Scope scope)
const QStringfilter () const
void setFilter (QString filter)
bool hasExtension (const QString &key) const
Extension extension (const QString &key) const
QString extension (const QString &key, bool &critical) const
void setExtension (const QString &key, const Extension &ext)
void setExtension (const QString &key, const QString &value, bool critical=false)
void removeExtension (const QString &key)
void updateQuery ()

Protected Member Functions

void parseQuery ()

Classes

struct  Extension

Detailed Description

LDAPUrl.

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]]]]]]

Definition at line 42 of file ldapurl.h.


Constructor & Destructor Documentation

LDAPUrl::LDAPUrl  ) 
 

Constructs an empty KLDAPUrl.

Definition at line 29 of file ldapurl.cpp.

LDAPUrl::LDAPUrl const KURL url  ) 
 

Constructs a KLDAPUrl from a KURL.

Definition at line 34 of file ldapurl.cpp.

References QDir::isRelativePath(), parseQuery(), and KURL::path().


Member Function Documentation

const QString& KABC::LDAPUrl::dn  )  const [inline]
 

Returns the dn part of the LDAP Url (same as path(), but slash removed from the beginning).

Definition at line 62 of file ldapurl.h.

void LDAPUrl::setDn const QString dn  ) 
 

Sets the the dn part of the LDAP Url.

Definition at line 47 of file ldapurl.cpp.

References QDir::isRelativePath(), QString::remove(), and KURL::setPath().

Referenced by KABC::LdapConfigWidget::url().

const QStringList& KABC::LDAPUrl::attributes  )  [inline]
 

Returns the attributes part of the LDAP Url.

Definition at line 67 of file ldapurl.h.

void KABC::LDAPUrl::setAttributes const QStringList attributes  )  [inline]
 

Sets the attributes part of the LDAP Url.

Definition at line 69 of file ldapurl.h.

Scope KABC::LDAPUrl::scope  )  const [inline]
 

Returns the scope part of the LDAP Url.

Definition at line 73 of file ldapurl.h.

void KABC::LDAPUrl::setScope Scope  scope  )  [inline]
 

Sets the scope part of the LDAP Url.

Definition at line 75 of file ldapurl.h.

const QString& KABC::LDAPUrl::filter  )  const [inline]
 

Returns the filter part of the LDAP Url.

Definition at line 78 of file ldapurl.h.

void KABC::LDAPUrl::setFilter QString  filter  )  [inline]
 

Sets the filter part of the LDAP Url.

Definition at line 80 of file ldapurl.h.

Referenced by KABC::LdapConfigWidget::url().

bool LDAPUrl::hasExtension const QString key  )  const
 

Returns if the specified extension exists in the LDAP Url.

Definition at line 59 of file ldapurl.cpp.

References QMap::contains().

LDAPUrl::Extension LDAPUrl::extension const QString key  )  const
 

Returns the specified extension.

Definition at line 64 of file ldapurl.cpp.

References QMap::constEnd(), KABC::LDAPUrl::Extension::critical, QMap::find(), and KABC::LDAPUrl::Extension::value.

Referenced by extension().

QString LDAPUrl::extension const QString key,
bool &  critical
const
 

Returns the specified extension.

Definition at line 79 of file ldapurl.cpp.

References KABC::LDAPUrl::Extension::critical, extension(), and KABC::LDAPUrl::Extension::value.

void LDAPUrl::setExtension const QString key,
const Extension ext
 

Sets the specified extension key with the value and criticality in ext.

Definition at line 88 of file ldapurl.cpp.

References updateQuery().

Referenced by parseQuery(), setExtension(), and KABC::LdapConfigWidget::url().

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 94 of file ldapurl.cpp.

References KABC::LDAPUrl::Extension::critical, setExtension(), and KABC::LDAPUrl::Extension::value.

void LDAPUrl::removeExtension const QString key  ) 
 

Removes the specified extension.

Definition at line 102 of file ldapurl.cpp.

References QMap::remove(), and updateQuery().

void LDAPUrl::updateQuery  ) 
 

Updates the query component from the attributes, scope, filter and extensions.

Definition at line 108 of file ldapurl.cpp.

References QMap::begin(), QMap::end(), endl(), QString::endsWith(), QMap::isEmpty(), QString::isEmpty(), QStringList::join(), kdDebug(), QString::length(), KURL::prettyURL(), QString::remove(), and KURL::setQuery().

Referenced by removeExtension(), and setExtension().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kabc Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 8 06:25:02 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003