KLDAP Library
ldapurl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KLDAP_LDAPURL_H
00022 #define KLDAP_LDAPURL_H
00023
00024 #include <QtCore/QMap>
00025 #include <QtCore/QStringList>
00026
00027 #include <kurl.h>
00028
00029 #include "ldapdn.h"
00030 #include "kldap_export.h"
00031
00032 namespace KLDAP {
00033
00042 class KLDAP_EXPORT LdapUrl : public KUrl
00043 {
00044 public:
00045
00050 typedef struct {
00051 QString value;
00052 bool critical;
00053 } Extension;
00054
00058 typedef enum {
00059 Base,
00060 One,
00061 Sub
00062 } Scope;
00063
00067 LdapUrl();
00068
00072 explicit LdapUrl( const KUrl &url );
00073
00077 LdapUrl( const LdapUrl &other );
00078
00083 LdapUrl &operator=( const LdapUrl &other );
00084
00088 virtual ~LdapUrl();
00089
00093 void setDn( const LdapDN &dn );
00094
00099 LdapDN dn() const;
00100
00104 void setAttributes( const QStringList &attributes );
00105
00109 QStringList attributes() const;
00110
00114 void setScope( Scope scope );
00115
00119 Scope scope() const;
00120
00124 void setFilter( const QString &filter );
00125
00129 QString filter() const;
00130
00134 bool hasExtension( const QString &extension ) const;
00135
00139 Extension extension( const QString &extension ) const;
00140
00144 QString extension( const QString &extension, bool &critical ) const;
00145
00149 void setExtension( const QString &key, const Extension &extension );
00150
00154 void setExtension( const QString &key, const QString &value, bool critical = false );
00155
00159 void setExtension( const QString &key, int value, bool critical = false );
00160
00164 void removeExtension( const QString &extension );
00165
00169 void updateQuery();
00170
00175 void parseQuery();
00176
00177 private:
00178 class LdapUrlPrivate;
00179 LdapUrlPrivate *const d;
00180 };
00181
00182 }
00183
00184 #endif