ldapurl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef _K_LDAPURL_H_
00022
#define _K_LDAPURL_H_
00023
00024
#include <qstring.h>
00025
#include <qstringlist.h>
00026
#include <qmap.h>
00027
00028
#include <kurl.h>
00029
00030
namespace KABC {
00031
00042 class KABC_EXPORT LDAPUrl :
public KURL
00043 {
00044
public:
00045
00046
struct Extension {
00047
QString value;
00048
bool critical;
00049 };
00050
00051
typedef enum Scope { Base, One, Sub };
00052
00054 LDAPUrl();
00056 LDAPUrl(
const KURL &url );
00057
00062 const QString& dn()
const {
return m_dn; };
00064
void setDn(
const QString &dn );
00065
00067 const QStringList &attributes() {
return m_attributes; }
00069 void setAttributes(
const QStringList &attributes )
00070 { m_attributes=attributes; updateQuery(); }
00071
00073 Scope scope()
const {
return m_scope; };
00075 void setScope(Scope scope) { m_scope = scope; updateQuery(); }
00076
00078 const QString &filter()
const {
return m_filter; }
00080 void setFilter(
QString filter ) { m_filter = filter; updateQuery(); }
00081
00083
bool hasExtension(
const QString &key )
const;
00085 Extension extension(
const QString &key )
const;
00087
QString extension(
const QString &key,
bool &critical )
const;
00089
void setExtension(
const QString &key,
const Extension &ext );
00091
void setExtension(
const QString &key,
const QString &value,
bool critical =
false );
00093
void removeExtension(
const QString &key );
00095
void updateQuery();
00096
00097
protected:
00098
void parseQuery();
00099
00100
private:
00101
00102
QMap<QString, Extension> m_extensions;
00103
QString m_dn;
00104
QStringList m_attributes;
00105 Scope m_scope;
00106
QString m_filter;
00107 };
00108 }
00109
00110
#endif
This file is part of the documentation for kabc Library Version 3.4.0.