KABC::LDAPUrl Class Reference

`#include <ldapurl.h>`

Inheritance diagram for KABC::LDAPUrl:

## Public Types

enum | Scope { Base, One, Sub }
Public Types inherited from KURL
enum | AdjustementFlags
enum | URIMode
enum | QueryItemsOptions

## Public Member Functions

| LDAPUrl ()
| LDAPUrl (const KURL &url)
const QString & | dn () const
void | setDn (const QString &dn)
const QStringList & | attributes ()
void | setAttributes (const QStringList &attributes)
Scope | scope () const
void | setScope (Scope scope)
const QString & | filter () 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 ()
Public Member Functions inherited from KURL
| KURL (const QString &url, int encoding_hint=0)
| KURL (const char *url, int encoding_hint=0)
| KURL (const QCString &url, int encoding_hint=0)
| KURL (const KURL &u)
| KURL (const QUrl &u)
| KURL (const KURL &_baseurl, const QString &_rel_url, int encoding_hint=0)
QString | protocol () const
void | setProtocol (const QString &_txt)
int | uriMode () const
QString | user () const
void | setUser (const QString &_txt)
bool | hasUser () const
QString | pass () const
void | setPass (const QString &_txt)
bool | hasPass () const
QString | host () const
void | setHost (const QString &_txt)
bool | hasHost () const
unsigned short int | port () const
void | setPort (unsigned short int _p)
QString | path () const
QString | path (int _trailing) const
void | setPath (const QString &path)
bool | hasPath () const
void | cleanPath (bool cleanDirSeparator=true)
void | adjustPath (int _trailing)
void | setEncodedPathAndQuery (const QString &_txt, int encoding_hint=0)
void | setEncodedPath (const QString &_txt, int encoding_hint=0)
QString | encodedPathAndQuery (int _trailing=0, bool _no_empty_path=false, int encoding_hint=0) const
void | setQuery (const QString &_txt, int encoding_hint=0)
QString | query () const
QString | ref () const
void | setRef (const QString &_txt)
bool | hasRef () const
QString | htmlRef () const
QString | encodedHtmlRef () const
void | setHTMLRef (const QString &_ref)
bool | hasHTMLRef () const
bool | isValid () const
KDE_DEPRECATED bool | isMalformed () const
bool | isLocalFile () const
void | setFileEncoding (const QString &encoding)
QString | fileEncoding () const
bool | hasSubURL () const
void | addPath (const QString &txt)
QString | queryItem (const QString &item) const
QString | queryItem (const QString &item, int encoding_hint) const
QMap< QString, QString > | queryItems (int options, int encoding_hint) const
void | addQueryItem (const QString &_item, const QString &_value, int encoding_hint=0)
void | removeQueryItem (const QString &_item)
void | setFileName (const QString &_txt)
QString | fileName (bool _ignore_trailing_slash_in_path=true) const
QString | directory (bool _strip_trailing_slash_from_result=true, bool _ignore_trailing_slash_in_path=true) const
void | setDirectory (const QString &dir)
bool | cd (const QString &_dir)
QString | url (int _trailing=0, int encoding_hint=0) const
QString | prettyURL (int _trailing=0) const
QString | prettyURL (int _trailing, AdjustementFlags _flags) const
QString | pathOrURL () const
QString | htmlURL () const
bool | isEmpty () const
KURL | upURL () const
bool | operator< (const KURL &_u) const
KURL & | operator= (const KURL &_u)
KURL & | operator= (const QString &_url)
KURL & | operator= (const char *_url)
KURL & | operator= (const QUrl &u)
bool | operator== (const KURL &_u) const
bool | operator== (const QString &_u) const
bool | operator!= (const KURL &_u) const
bool | operator!= (const QString &_u) const
bool | cmp (const KURL &u, bool ignore_trailing=false) const KDE_DEPRECATED
bool | equals (const KURL &u, bool ignore_trailing=false) const
bool | isParentOf (const KURL &u) const
QString | filename (bool _ignore_trailing_slash_in_path=true) const
bool | urlcmp (const QString &_url1, const QString &_url2)
bool | urlcmp (const QString &_url1, const QString &_url2, bool _ignore_trailing, bool _ignore_ref)

## Protected Member Functions

void | parseQuery ()
Protected Member Functions inherited from KURL
void | reset ()
void | parseURL (const QString &_url, int encoding_hint=0)
void | parseRawURI (const QString &_url, int encoding_hint=0)
void | parseMailto (const QString &_url, int encoding_hint=0)
void | parse (const QString &_url, int encoding_hint=0)

## Additional Inherited Members

Static Public Member Functions inherited from KURL
static List | split (const QString &_url)
static List | split (const KURL &_url)
static KURL | join (const List &_list)
static KURL | fromPathOrURL (const QString &text)
static QString | encode_string (const QString &str, int encoding_hint=0)
static QString | encode_string_no_slash (const QString &str, int encoding_hint=0)
static QString | decode_string (const QString &str, int encoding_hint=0)
static bool | isRelativeURL (const QString &_url)
static QString | relativeURL (const KURL &base_url, const KURL &url, int encoding_hint=0)
static QString | relativePath (const QString &base_dir, const QString &path, bool *isParent=0)
static URIMode | uriModeForProtocol (const QString &protocol)

## 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.

## Member Function Documentation

const QStringList& KABC::LDAPUrl::attributes | ( |  | ) |

inline

Returns the attributes part of the LDAP Url.

Definition at line 67 of file ldapurl.h.

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.

LDAPUrl::Extension LDAPUrl::extension | ( | const QString & | key | ) | const

Returns the specified extension.

Definition at line 64 of file ldapurl.cpp.

QString LDAPUrl::extension | ( | const QString & | key,
|  | bool & | critical
| ) |  | const

Returns the specified extension.

Definition at line 79 of file ldapurl.cpp.

const QString& KABC::LDAPUrl::filter | ( |  | ) | const

inline

Returns the filter part of the LDAP Url.

Definition at line 78 of file ldapurl.h.

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.

void LDAPUrl::removeExtension | ( | const QString & | key | ) |

Removes the specified extension.

Definition at line 102 of file ldapurl.cpp.

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::setAttributes | ( | const QStringList & | attributes | ) |

inline

Sets the attributes part of the LDAP Url.

Definition at line 69 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.

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.

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.

void KABC::LDAPUrl::setFilter | ( | QString | filter | ) |

inline

Sets the filter part of the LDAP Url.

Definition at line 80 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.

void LDAPUrl::updateQuery | ( |  | ) |

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

Definition at line 108 of file ldapurl.cpp.

The documentation for this class was generated from the following files:

- ldapurl.h
- ldapurl.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys